瀏覽代碼

Initialize any new compiler with its default options

simov 8 年之前
父節點
當前提交
6d9624e01f
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      background/background.js

+ 6 - 0
background/background.js

@@ -55,6 +55,12 @@ chrome.storage.sync.get((res) => {
     options.compiler = 'remark'
   }
 
+  Object.keys(md).forEach((compiler) => {
+    if (!options[compiler]) {
+      options[compiler] = md[compiler].defaults
+    }
+  })
+
   chrome.storage.sync.set(options)
 
   // reload extension bug