Skip to content

Commit a3ee7fa

Browse files
committed
replaced type assertions
1 parent 76f823d commit a3ee7fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/skeleton/src/lib/components/TreeView/TreeViewItem.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230
if (!open) open = true;
231231
else if ($$slots.children && !hideChildren) {
232232
// focus on first child
233-
const child = childrenDiv.querySelector('details>summary') as HTMLElement;
233+
const child = childrenDiv.querySelector<HTMLElement>('details>summary');
234234
if (child) child.focus();
235235
}
236236
break;
@@ -239,7 +239,7 @@
239239
else {
240240
// focus on parent
241241
const parent = treeItem.parentElement?.parentElement;
242-
if (parent && parent.tagName === 'DETAILS') (parent.querySelector('summary') as HTMLElement).focus();
242+
if (parent && parent.tagName === 'DETAILS') parent.querySelector<HTMLElement>('summary')?.focus();
243243
}
244244
break;
245245
case 'Home':

0 commit comments

Comments
 (0)