fixup: call getDateFromVer when updateUrl is set, #1159

This commit is contained in:
tophf 2021-02-05 09:49:23 +03:00
parent 34c067c3be
commit 784a1018f8

View File

@ -237,11 +237,11 @@ const updateMan = (() => {
async function maybeSave(json) { async function maybeSave(json) {
json.id = id; json.id = id;
json.updateDate = getDateFromVer(json) || Date.now();
// keep current state // keep current state
delete json.customName; delete json.customName;
delete json.enabled; delete json.enabled;
const newStyle = Object.assign({}, style, json); const newStyle = Object.assign({}, style, json);
newStyle.updateDate = getDateFromVer(newStyle) || Date.now();
// update digest even if save === false as there might be just a space added etc. // update digest even if save === false as there might be just a space added etc.
if (!ucd && styleSectionsEqual(json, style)) { if (!ucd && styleSectionsEqual(json, style)) {
style.originalDigest = (await API.styles.install(newStyle)).originalDigest; style.originalDigest = (await API.styles.install(newStyle)).originalDigest;