Skip to content

Commit

Permalink
Fix startup error introduced in dd0169b
Browse files Browse the repository at this point in the history
uncaughtException TypeError:
module$electron$utils.safe_decode_uri_component is not a function

Interesting that kondo doesn't catch invalid fns from js requires
  • Loading branch information
logseq-cldwalker committed Nov 7, 2022
1 parent cff3f15 commit 2ed7d82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .clj-kondo/config.edn
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
datascript.transit dt
datascript.db ddb
electron.ipc ipc
electron.utils utils
"/electron/utils" js-utils
frontend.commands commands
frontend.config config
frontend.date date
Expand Down
7 changes: 4 additions & 3 deletions src/electron/electron/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
[electron.search :as search]
[electron.updater :refer [init-updater] :as updater]
[electron.utils :refer [*win mac? linux? dev? get-win-from-sender restore-user-fetch-agent
decode-protected-assets-schema-path get-graph-name send-to-renderer]]
decode-protected-assets-schema-path get-graph-name send-to-renderer]
:as utils]
[electron.url :refer [logseq-url-handler]]
[electron.logger :as logger]
[clojure.string :as string]
Expand All @@ -20,7 +21,7 @@
[electron.git :as git]
[electron.window :as win]
[electron.exceptions :as exceptions]
["/electron/utils" :as utils]))
["/electron/utils" :as js-utils]))

;; Keep same as main/frontend.util.url
(defonce LSP_SCHEME "logseq")
Expand Down Expand Up @@ -301,7 +302,7 @@

(restore-user-fetch-agent)

(utils/disableXFrameOptions win)
(js-utils/disableXFrameOptions win)

(search/ensure-search-dir!)

Expand Down

0 comments on commit 2ed7d82

Please sign in to comment.