Fix: buggy destructuring
This commit is contained in:
parent
12ec07d0a0
commit
fb046d44be
|
@ -232,6 +232,7 @@
|
||||||
.then(init)
|
.then(init)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
$('#header').classList.add('meta-init-error');
|
$('#header').classList.add('meta-init-error');
|
||||||
|
console.error(err);
|
||||||
showError(err);
|
showError(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,9 @@ const usercss = (() => {
|
||||||
})
|
})
|
||||||
.then(({metadata}) => {
|
.then(({metadata}) => {
|
||||||
style.usercssData = metadata;
|
style.usercssData = metadata;
|
||||||
for (const [key, value = key] of Object.entries(GLOBAL_METAS)) {
|
// https://github.com/openstyles/stylus/issues/560#issuecomment-440561196
|
||||||
style[value] = metadata[key];
|
for (const [key, value] of Object.entries(GLOBAL_METAS)) {
|
||||||
|
style[value || key] = metadata[key];
|
||||||
}
|
}
|
||||||
return style;
|
return style;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user