Files
logseq/src
Victor239 8b20877f7f fix(electron): repair custom URI scheme links
The npm `open` package (v8.4.2) is CommonJS with `module.exports = open;`
and no `.default` property, so importing it as `["open" :default open-external]`
left `open-external` undefined. Every custom-scheme click (freetube://, tg://,
etc.) reached `open-default-app!`, showed the confirmation dialog, and then
threw `TypeError: ...default is not a function` from inside (default-open url),
which Electron logged as an uncaughtException with no user-visible feedback.

Switch to `:as open-external` so the symbol binds to module.exports itself
(the open function). The neighboring node-fetch import is left as `:default`
because node-fetch v2.7.0 explicitly sets `exports.default = exports` for
ESM-interop, so it actually has a default export.

Regression from d6403b7746 (#12460), which replaced the prior working
`(defonce open (js/require "open"))` with the shadow-cljs ESM-style import.
2026-05-03 23:48:57 +08:00
..
2026-05-03 23:46:55 +08:00