Selaa lähdekoodia

Initialize any new compiler with its default options

simov 8 vuotta sitten
vanhempi
sitoutus
6d9624e01f
1 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  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