Explorar el Código

Initialize any new compiler with its default options

simov hace 8 años
padre
commit
6d9624e01f
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  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