Skip to content

Commit f31dcd0

Browse files
committed
update warning
1 parent 1c082a5 commit f31dcd0

File tree

1 file changed

+2
-2
lines changed
  • packages/svelte/src/compiler/phases/2-analyze

1 file changed

+2
-2
lines changed

packages/svelte/src/compiler/phases/2-analyze/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,8 @@ const runes_scope_tweaker = {
892892
CallExpression(node, { state, next }) {
893893
const rune = get_rune(node, state.scope);
894894

895-
// `$inspect(foo)` should not trigger the `static-state-reference` warning
896-
if (rune === '$inspect') {
895+
// `$inspect(foo)` or $lazy(foo) should not trigger the `static-state-reference` warning
896+
if (rune === '$inspect' || rune === '$lazy') {
897897
next({ ...state, function_depth: state.function_depth + 1 });
898898
}
899899
},

0 commit comments

Comments
 (0)