Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] accessing r.properties.ROAM_REFS causing client crash due to r.properties being null, caused by passing local variable that changes major-mode #318

Open
hermanhel opened this issue Jul 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@hermanhel
Copy link

Describe the bug
Accessing r.properties.ROAM_REFS causing client crash due to r.properties being null. This can happen if you have put local varibles like following:

# Local Variables:
# mode: sh
# sh-shell: tcsh
# End:

in one of your org-roam note
To Reproduce
Which specific things did you do which lead to said bug? E.g. what did you click, which commands did you call, etc.

  1. add the
# Local Variables:
# mode: sh
# sh-shell: tcsh
# End:

to one of the org-roam note
2. call org-roam-ui-mode
3. see the crash in your openned browser, together with the error cannot access r.properties.ROAM_REFS, r.properties is null

Expected behavior
It should not crash the whole client. Maybe an empty note or an error message on screen like "WOW, an image", "WOW, no properties drawer".

What browser were you using?
Firefox

Additional context
This is does not affect publish-org-roam-ui's local.sh.

calling (org-element-parse-buffer) on an sh-mode buffer parses the properties alright.

@hermanhel hermanhel added the bug Something isn't working label Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant