From f36ce5c6251970bee9ae346e4ee7e008c5a8b5e7 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Sun, 20 Aug 2017 10:57:58 -0500 Subject: [PATCH] Fix undefined stylelintDefaultConfig --- edit/lint.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edit/lint.js b/edit/lint.js index a310da7c..7c3182db 100644 --- a/edit/lint.js +++ b/edit/lint.js @@ -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);