Fix: don't assign undefined to style object

This commit is contained in:
eight 2019-08-21 19:33:41 +08:00
parent 0e9d5ce08c
commit be20aee916

View File

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