ソースを参照

fix(cards): only check when enabled

Andelf 3 年 前
コミット
60c559bb24
1 ファイル変更5 行追加3 行削除
  1. 5 3
      src/main/frontend/state.cljs

+ 5 - 3
src/main/frontend/state.cljs

@@ -365,9 +365,11 @@
                 (get (sub-config) repo)))))
 
 (defn enable-flashcards?
-  [repo]
-  (not (false? (:feature/enable-flashcards?
-                (get (sub-config) repo)))))
+  ([]
+   (enable-flashcards? (get-current-repo)))
+  ([repo]
+   (not (false? (:feature/enable-flashcards?
+                 (get (sub-config) repo))))))
 
 (defn export-heading-to-list?
   []