From 16bd1bb566701f44e7810cdfc37061e24863b349 Mon Sep 17 00:00:00 2001 From: "Saad A. Bazaz" Date: Mon, 15 Jul 2024 06:06:15 +0500 Subject: [PATCH] fix: add typecast --- dialog/internal/dialog.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dialog/internal/dialog.ts b/dialog/internal/dialog.ts index cc86fd33c0..a8b610beae 100644 --- a/dialog/internal/dialog.ts +++ b/dialog/internal/dialog.ts @@ -153,7 +153,7 @@ export class Dialog extends LitElement { // focusable elements. TreeWalker is faster than `querySelectorAll('*')`. // We check for isServer because there isn't a "document" during an SSR // run. - private readonly treewalker = isServer ? {} : document.createTreeWalker( + private readonly treewalker = isServer ? {} as TreeWalker : document.createTreeWalker( this, NodeFilter.SHOW_ELEMENT, );