Passing object
-> Passing property
(#1277)
- Resolves #1276 - Just pass the parameter which is either undefined or an number. No need to get it from a object, while we can just pass the property already.
This commit is contained in:
parent
9e9c9061dc
commit
ffcdf47ab5
|
@ -395,7 +395,7 @@ const styleMan = (() => {
|
||||||
handleSave(await saveStyle(someStyle), null, null, false);
|
handleSave(await saveStyle(someStyle), null, null, false);
|
||||||
}
|
}
|
||||||
style._usw = {
|
style._usw = {
|
||||||
token: await tokenMan.getToken('userstylesworld', true, style),
|
token: await tokenMan.getToken('userstylesworld', true, style.id),
|
||||||
};
|
};
|
||||||
|
|
||||||
delete style._isUswLinked;
|
delete style._isUswLinked;
|
||||||
|
|
|
@ -78,8 +78,8 @@ const tokenMan = (() => {
|
||||||
return AUTH[name].clientId;
|
return AUTH[name].clientId;
|
||||||
},
|
},
|
||||||
|
|
||||||
async getToken(name, interactive, style) {
|
async getToken(name, interactive, styleId) {
|
||||||
const k = tokenMan.buildKeys(name, style.id);
|
const k = tokenMan.buildKeys(name, styleId);
|
||||||
const obj = await chromeLocal.get(k.LIST);
|
const obj = await chromeLocal.get(k.LIST);
|
||||||
if (obj[k.TOKEN]) {
|
if (obj[k.TOKEN]) {
|
||||||
if (!obj[k.EXPIRE] || Date.now() < obj[k.EXPIRE]) {
|
if (!obj[k.EXPIRE] || Date.now() < obj[k.EXPIRE]) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user