fix: improve `each_key_without_as` error

pull/16983/head
Rich Harris 2 days ago
parent bd2d3db6d0
commit bca4c39f5e

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: improve `each_key_without_as` error

@ -1,3 +1,4 @@
/** @import { Expression } from 'estree' */
/** @import { AST, Binding } from '#compiler' */
/** @import { Context } from '../types' */
/** @import { Scope } from '../../scope' */
@ -29,7 +30,7 @@ export function EachBlock(node, context) {
}
if (node.metadata.keyed && !node.context) {
e.each_key_without_as(node);
e.each_key_without_as(/** @type {Expression} */ (node.key));
}
// evaluate expression in parent scope

Loading…
Cancel
Save