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;