diff --git a/background/usercss-helper.js b/background/usercss-helper.js index f2d7521d..804e7c80 100644 --- a/background/usercss-helper.js +++ b/background/usercss-helper.js @@ -35,10 +35,7 @@ var usercssHelper = (() => { ])) .then(([style, dup]) => ({style, dup})); - if (noReject) { - return wrapReject(pending); - } - return pending; + return noReject ? wrapReject(pending) : pending; } function save(style, noReject) { @@ -47,11 +44,7 @@ var usercssHelper = (() => { .then(buildCode) .then(saveStyle); - if (noReject) { - return wrapReject(pending); - } - - return pending; + return noReject ? wrapReject(pending) : pending; function assignVars(style) { if (style.reason === 'config' && style.id) {