Skip to content

Commit 06ddc8c

Browse files
chore: add comment
Co-authored-by: Simon H <[email protected]>
1 parent 44bec4c commit 06ddc8c

File tree

1 file changed

+3
-0
lines changed
  • packages/svelte/src/compiler/phases/3-transform/client/visitors/shared

1 file changed

+3
-0
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/shared/utils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,9 @@ export function validate_mutation(node, context, expression) {
370370
export function build_expression(context, expression, metadata, state = context.state) {
371371
const value = /** @type {Expression} */ (context.visit(expression, state));
372372

373+
// Components not explicitly in legacy mode might be expected to be in runes mode (especially since we didn't
374+
// adjust this behavior until recently, which broke people's existing components), so we also bail in this case.
375+
// Kind of an in-between-mode.
373376
if (context.state.analysis.runes || context.state.analysis.maybe_runes) {
374377
return value;
375378
}

0 commit comments

Comments
 (0)