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

To reproduce: open the gobble repo in the patches listing and switch between the two open patches repeatedly. You should see an exception in the dev console pop up mentioning the Markdown.svelte renderer.

Fixes this issue.

check check-e2e

👉 Workflow runs 👉 Branch on GitHub

1 file changed +5 -0 31b2d9a9 0f02d440
modified src/components/Markdown.svelte
@@ -47,6 +47,11 @@
    content;

    void tick().then(() => {
+
      // Don't run this if the component hasn't mounted yet.
+
      if (container === null) {
+
        return;
+
      }
+

      for (const e of container.querySelectorAll("a")) {
        try {
          const url = new URL(e.href);