Fix: drop array selection

This commit is contained in:
eight 2018-10-16 22:04:29 +08:00
parent 0b4d12a71f
commit e8b64d11a3

View File

@ -88,9 +88,18 @@
'ignoreDigest' option is set on the second manual individual update check on the manage page. 'ignoreDigest' option is set on the second manual individual update check on the manage page.
*/ */
return fetchStyle() return fetchStyle()
.then([calcStyleDigest][!ignoreDigest ? 0 : 'skip']) .then(() => {
.then([checkIfEdited][!ignoreDigest ? 0 : 'skip']) if (!ignoreDigest) {
.then([maybeUpdateUSO, maybeUpdateUsercss][style.usercssData ? 1 : 0]) return calcStyleDigest(style)
.then(checkIfEdited);
}
})
.then(() => {
if (style.usercssData) {
return maybeUpdateUsercss();
}
return maybeUpdateUSO();
})
.then(maybeSave) .then(maybeSave)
.then(reportSuccess) .then(reportSuccess)
.catch(reportFailure); .catch(reportFailure);
@ -100,8 +109,8 @@
return Promise.resolve(); return Promise.resolve();
} }
return styleManager.get(id) return styleManager.get(id)
.then(_style => { .then(style_ => {
style = _style; style = style_;
}); });
} }