some is more 'correct' than find

pull/16542/head
Rich Harris 4 weeks ago
parent b1cc101c08
commit e57f09ffe9

@ -11,13 +11,15 @@ export function AwaitExpression(node, context) {
if (context.state.expression) {
context.state.expression.has_await = true;
if (
context.state.fragment &&
// TODO there's probably a better way to do this
context.path.find((node) => node.type === 'ConstTag')
context.path.some((node) => node.type === 'ConstTag')
) {
context.state.fragment.metadata.has_await = true;
}
suspend = true;
}

Loading…
Cancel
Save