Javascript error in RStudio Viewer but not Chrome or Firefox

I am running into some issues where some javascript is producing an error in RStudio viewer but not in other browsers. Using babel to transpile the javascript to ES2015+ did not work. Any ideas would be appreciated!

P.S. I am posting this here instead of on rstudio/issues because I suspect it is probably an issue with my nascent understanding of javascript rather than an issue with RStudio per se. But if this is a bug, I can move it over.

To recreate:

  1. Install quarto-cli and then install my lordicon extension
  2. quarto install extension jmgirard/lordicon
  3. Download and render this example file to RStudio Viewer
    lordicon/example.qmd at main · jmgirard/lordicon · GitHub
  4. Notice that the icons are missing and Inspect shows errors
  5. But open the rendered HTML file in Chrome and no errors

Relevant Issue from my package:

Relevant Quarto discussion:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.