Fix undefined stylelintDefaultConfig

This commit is contained in:
Rob Garrison 2017-08-20 10:57:58 -05:00
parent 7da5bd1408
commit f36ce5c625

View File

@ -15,8 +15,8 @@ function initLint() {
BG.chromeLocal.getValue('editorStylelintRules').then(rules => setStylelintRules(rules));
}
function setStylelintRules(rules = {}) {
if (Object.keys(rules).length === 0) {
function setStylelintRules(rules = '') {
if (Object.keys(rules).length === 0 && typeof stylelintDefaultConfig !== 'undefined') {
rules = deepCopy(stylelintDefaultConfig.rules);
}
BG.chromeLocal.setValue('editorStylelintRules', rules);