Refactor: shouldShowConfig

This commit is contained in:
eight 2017-11-09 09:04:19 +08:00
parent 78c1a1bd3c
commit 5dd322e512

View File

@ -204,10 +204,7 @@ function createStyleElement({style, name}) {
return entry;
function shouldShowConfig() {
if (!style.usercssData) {
return false;
}
return Object.keys(style.usercssData.vars).length > 0;
return style.usercssData && Object.keys(style.usercssData.vars).length > 0;
}
}