org-roam-ui
org-roam-ui copied to clipboard
[BUG] accessing r.properties.ROAM_REFS causing client crash due to r.properties being null, caused by passing local variable that changes major-mode
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.
- 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.