소스 검색

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