diff --git a/client/utils/conversejs.ts b/client/utils/conversejs.ts index c50257a6..4d445a10 100644 --- a/client/utils/conversejs.ts +++ b/client/utils/conversejs.ts @@ -132,7 +132,7 @@ async function displayConverseJS ( // We will catch such clicks in converse-root, and prevent default! if (!ev.target) { return } - const a: HTMLAnchorElement | null = ('tagName' in ev.target) && ev.target.tagName === 'A' + const a: HTMLAnchorElement | null = ('tagName' in ev.target) && (ev.target as HTMLAnchorElement).tagName === 'A' ? ev.target as HTMLAnchorElement : (ev.target as HTMLElement).closest('a')