org-roam-ui icon indicating copy to clipboard operation
org-roam-ui copied to clipboard

[BUG] Error when viewing a citation node

Open egh opened this issue 3 years ago • 2 comments

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.

  1. Go to any citation node
  2. Click on it
  3. View the sidebar
  4. 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 image

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.

egh avatar Jan 29 '22 18:01 egh

Try replacing the condition with: orgText !== null

rasendubi avatar Jan 29 '22 20:01 rasendubi

@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.

egh avatar Jan 29 '22 23:01 egh