#482
This commit is contained in:
tophf 2018-08-27 20:42:17 +03:00
parent 2fdfd96699
commit af77b55eea
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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;