From 543f18c727e983ef2f33eac0dd70532bed62b7bc Mon Sep 17 00:00:00 2001 From: John Livingston Date: Wed, 3 Apr 2024 16:48:43 +0200 Subject: [PATCH] Fix Typescript. --- client/utils/conversejs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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')