Skip to content

Commit e57f09f

Browse files
committed
some is more 'correct' than find
1 parent b1cc101 commit e57f09f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/svelte/src/compiler/phases/2-analyze/visitors/AwaitExpression.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ export function AwaitExpression(node, context) {
1111

1212
if (context.state.expression) {
1313
context.state.expression.has_await = true;
14+
1415
if (
1516
context.state.fragment &&
1617
// TODO there's probably a better way to do this
17-
context.path.find((node) => node.type === 'ConstTag')
18+
context.path.some((node) => node.type === 'ConstTag')
1819
) {
1920
context.state.fragment.metadata.has_await = true;
2021
}
22+
2123
suspend = true;
2224
}
2325

0 commit comments

Comments
 (0)