From 92b01e19e8353465be9a49efe32ad948dfe5c116 Mon Sep 17 00:00:00 2001 From: eight Date: Thu, 9 Nov 2017 05:52:59 +0800 Subject: [PATCH] Fix: reindent single then --- background/usercss-helper.js | 19 +++++++++---------- content/install-user-css.js | 9 ++++----- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/background/usercss-helper.js b/background/usercss-helper.js index 804e7c80..c3a8432c 100644 --- a/background/usercss-helper.js +++ b/background/usercss-helper.js @@ -50,17 +50,16 @@ var usercssHelper = (() => { if (style.reason === 'config' && style.id) { return style; } - return findDup(style) - .then(dup => { - if (dup) { - style.id = dup.id; - if (style.reason !== 'config') { - // preserve style.vars during update - usercss.assignVars(style, dup); - } + return findDup(style).then(dup => { + if (dup) { + style.id = dup.id; + if (style.reason !== 'config') { + // preserve style.vars during update + usercss.assignVars(style, dup); } - return style; - }); + } + return style; + }); } } diff --git a/content/install-user-css.js b/content/install-user-css.js index 8aebcfc1..95ae9dd5 100644 --- a/content/install-user-css.js +++ b/content/install-user-css.js @@ -16,11 +16,10 @@ function createSourceLoader() { } function load() { - return fetchText(location.href) - .then(newSource => { - source = newSource; - return source; - }); + return fetchText(location.href).then(newSource => { + source = newSource; + return source; + }); } function watch(cb) {