From af77b55eea016757edef9844f4ea90592aecb32c Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 27 Aug 2018 20:42:17 +0300 Subject: [PATCH] fixup 2fdfd966 #482 --- background/update.js | 2 +- js/sections-equal.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/background/update.js b/background/update.js index a8d185ca..8426035e 100644 --- a/background/update.js +++ b/background/update.js @@ -185,7 +185,7 @@ global API_METHODS json.originalName = json.name; } - if (styleSectionsEqual(json, style)) { + if (styleSectionsEqual(json, style, {checkSource: true})) { // update digest even if save === false as there might be just a space added etc. json.reason = 'update-digest'; return saveStyle(json) diff --git a/js/sections-equal.js b/js/sections-equal.js index 9244ab68..d01c4bfe 100644 --- a/js/sections-equal.js +++ b/js/sections-equal.js @@ -12,7 +12,7 @@ * @returns {Boolean|undefined} */ function styleSectionsEqual(a, b, {ignoreCode, checkSource} = {}) { - if (!checkSource && + if (checkSource && typeof a.sourceCode === 'string' && typeof b.sourceCode === 'string') { return a.sourceCode === b.sourceCode;