Skip to content

Fix: guard missing checkCurrentIsDbGraph API to avoid handshake crash#69

Open
alaeri wants to merge 1 commit into
benjypng:mainfrom
alaeri:fix/guard-checkCurrentIsDbGraph
Open

Fix: guard missing checkCurrentIsDbGraph API to avoid handshake crash#69
alaeri wants to merge 1 commit into
benjypng:mainfrom
alaeri:fix/guard-checkCurrentIsDbGraph

Conversation

@alaeri
Copy link
Copy Markdown

@alaeri alaeri commented Feb 17, 2026

On some Logseq builds, App.checkCurrentIsDbGraph is not exported by the host, which causes the plugin to crash at load time with:

Not existed method #checkCurrentIsDbGraph

This change wraps the call in a try/catch block and falls back to false when the API is unavailable. This prevents the plugin from failing during initialization while preserving existing behavior on builds where the method is supported.

Investigation and patch were developed with assistance from ChatGPT.

No other behavior is modified.
Also I couldnt install bunx due to not having room for the xcode update so I couldn't run the lint/test suite but the fix is maybe simple enough?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant