saveStyle's codeIsUpdated can be true or false, not undefined

This commit is contained in:
tophf 2017-06-06 04:40:08 +03:00
parent 19754a5a90
commit ac5e9b965a

View File

@ -260,7 +260,7 @@ function saveStyle(style) {
if (reason == 'update-digest' && oldStyle.originalDigest == style.originalDigest) {
return style;
}
codeIsUpdated = !existed || style.sections && !styleSectionsEqual(style, oldStyle);
codeIsUpdated = !existed || 'sections' in style && !styleSectionsEqual(style, oldStyle);
style = Object.assign({}, oldStyle, style);
return write(style, store);
});