Fix Typescript.

This commit is contained in:
John Livingston 2024-04-03 16:48:43 +02:00
parent f46c56db2b
commit 543f18c727
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC

View File

@ -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')