diff --git a/install-usercss/install-usercss.js b/install-usercss/install-usercss.js index 211e4e2f..c6221489 100644 --- a/install-usercss/install-usercss.js +++ b/install-usercss/install-usercss.js @@ -232,6 +232,7 @@ .then(init) .catch(err => { $('#header').classList.add('meta-init-error'); + console.error(err); showError(err); }); } diff --git a/js/usercss.js b/js/usercss.js index 0e9b95a5..4c9d9ff8 100644 --- a/js/usercss.js +++ b/js/usercss.js @@ -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; });