Merge branch 'feat/db' into refactor/block-schema

This commit is contained in:
Gabriel Horner
2025-01-22 17:54:23 -05:00
8 changed files with 69 additions and 53 deletions

View File

@@ -628,9 +628,7 @@
dotroot (get-ls-dotdir-root)
filepath (util/node-path.join dotroot dirname (str key ".json"))]
(if (util/electron?)
(p/let [exist? (fs/file-exists? filepath)
_ (when-not exist? (fs/mkdir! filepath))
_ (fs/create-if-not-exists repo nil filepath (js/JSON.stringify default))
(p/let [_ (fs/create-if-not-exists repo nil filepath (js/JSON.stringify default))
json (fs/read-file nil filepath)]
[filepath (js/JSON.parse json)])
(p/let [data (idb/get-item filepath)]