Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Error in markdown renderer
Open rudolfs opened 1 year ago bug

Seeing this in the console when navigating to a patch with markdown content (e.g. this patch 40f307189167f317aec58318029836f5116d51e5 on radicle-desktop):

Unhandled Promise Rejection: TypeError: null is not an object (evaluating ‘container.querySelectorAll’)

  $effect(() => {
    // eslint-disable-next-line @typescript-eslint/no-unused-expressions
    content;

    void tick().then(() => {
-->   for (const e of container.querySelectorAll("a")) {
        try {
          const url = new URL(e.href);
          if (url.origin !== window.origin) {
            e.target = "_blank";
          }
        } catch (e) {
          console.warn("Not able to parse url", e);
        }
z6MkkfM3...sVz5 commented 1 year ago

I’m not seeing this bug anymore nor the markdown content on patch 40f307189167f317aec58318029836f5116d51e5. What kind of markdown content gave issues?

rudolfs commented 1 year ago

Hm, not seeing the error either anymore.

rudolfs commented 1 year ago

Ok, I was able to repro this. It seems like it’s a subtle timing issue. It shows up in the gobble repo when switching between the two open patches back and forth. Fixed in this patch.