Fix: buggy destructuring

This commit is contained in:
eight 2018-11-21 15:15:02 +08:00
parent 12ec07d0a0
commit fb046d44be
2 changed files with 4 additions and 2 deletions

View File

@ -232,6 +232,7 @@
.then(init)
.catch(err => {
$('#header').classList.add('meta-init-error');
console.error(err);
showError(err);
});
}

View File

@ -41,8 +41,9 @@ const usercss = (() => {
})
.then(({metadata}) => {
style.usercssData = metadata;
for (const [key, value = key] of Object.entries(GLOBAL_METAS)) {
style[value] = metadata[key];
// https://github.com/openstyles/stylus/issues/560#issuecomment-440561196
for (const [key, value] of Object.entries(GLOBAL_METAS)) {
style[value || key] = metadata[key];
}
return style;
});