org-roam-ui
org-roam-ui copied to clipboard
[BUG] Error when viewing a citation node
Describe the bug When viewing a citation node, I see a 500 error from the servlet.
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.
- Go to any citation node
- Click on it
- View the sidebar
- See error
Expected behavior Ideally, I would see a citation but that doesn't seem to be implemented in org-roam. Since that isn't possible, I should see no text.
Screenshots

What browser were you using? Firefox
Additional context
I broke this with my PR #203 . I know how to fix it, but if I return an empty string from the servlet, the text in the sidebar does not update, I think because of this line. I'm more familiar with elisp than typescript, so I'm not sure what to do here. I can return a non-empty string (e.g. " ") from the servlet to force updating, but that feels hacky. I'd prefer to force an update in the sidebar in typescript even when the orgtext is empty.
Try replacing the condition with: orgText !== null
@rasendubi Thanks for the suggestion! You are correct, but I was wrong: that is not where the text is updated, from what I can tell. I believe #211 will fix this.