Fix: noReject in one line

This commit is contained in:
eight 2017-11-09 05:51:58 +08:00
parent 08c7004123
commit 8d19e0b09a

View File

@ -35,10 +35,7 @@ var usercssHelper = (() => {
])) ]))
.then(([style, dup]) => ({style, dup})); .then(([style, dup]) => ({style, dup}));
if (noReject) { return noReject ? wrapReject(pending) : pending;
return wrapReject(pending);
}
return pending;
} }
function save(style, noReject) { function save(style, noReject) {
@ -47,11 +44,7 @@ var usercssHelper = (() => {
.then(buildCode) .then(buildCode)
.then(saveStyle); .then(saveStyle);
if (noReject) { return noReject ? wrapReject(pending) : pending;
return wrapReject(pending);
}
return pending;
function assignVars(style) { function assignVars(style) {
if (style.reason === 'config' && style.id) { if (style.reason === 'config' && style.id) {