From ab84533278408b253ce09895fe36bb5212d81a9c Mon Sep 17 00:00:00 2001 From: Nguyen Tran Date: Tue, 28 Feb 2023 10:15:42 -0500 Subject: [PATCH] Fix typing in extract_ignores_above_node --- src/compiler/utils/extract_svelte_ignore.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/utils/extract_svelte_ignore.ts b/src/compiler/utils/extract_svelte_ignore.ts index f744199457..d4a8369a16 100644 --- a/src/compiler/utils/extract_svelte_ignore.ts +++ b/src/compiler/utils/extract_svelte_ignore.ts @@ -1,7 +1,6 @@ import { TemplateNode } from '../interfaces'; import { flatten } from './flatten'; import { regex_whitespace } from './patterns'; -import Node from '../compile/nodes/shared/Node'; import { INode } from '../compile/nodes/interfaces'; const regex_svelte_ignore = /^\s*svelte-ignore\s+([\s\S]+)\s*$/m; @@ -42,7 +41,7 @@ export function extract_ignores_above_node(node: INode): string[] { * which means that it can find svelte-ignores along * the nodes on the same level as itself who share the same parent. */ - let cur_node: INode | undefined = node.prev; + let cur_node = node.prev; while (cur_node) { if (cur_node.type !== 'Comment' && cur_node.type !== 'Text') { return [];