Error in markdown renderer
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);
}
I’m not seeing this bug anymore nor the markdown content on patch
40f307189167f317aec58318029836f5116d51e5. What kind of markdown content gave issues?Hm, not seeing the error either anymore.
Ok, I was able to repro this. It seems like it’s a subtle timing issue. It shows up in the
gobblerepo when switching between the two open patches back and forth. Fixed in this patch.