Skip to content

Commit 34d9a59

Browse files
committed
doh
1 parent 8ad1b98 commit 34d9a59

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,9 @@ export const validation_runes = merge(validation, a11y_validators, {
10421042
}
10431043
},
10441044
CallExpression(node, { state, path }) {
1045+
if (get_rune(node, state.scope) === '$bindable' && node.arguments.length > 1) {
1046+
error(node, 'invalid-rune-args-length', '$bindable', [0, 1]);
1047+
}
10451048
validate_call_expression(node, state.scope, path);
10461049
},
10471050
EachBlock(node, { next, state }) {
@@ -1072,7 +1075,7 @@ export const validation_runes = merge(validation, a11y_validators, {
10721075
// TODO some of this is duplicated with above, seems off
10731076
if ((rune === '$derived' || rune === '$derived.by') && args.length !== 1) {
10741077
error(node, 'invalid-rune-args-length', rune, [1]);
1075-
} else if ((rune === '$state' || rune === '$bindable') && args.length > 1) {
1078+
} else if (rune === '$state' && args.length > 1) {
10761079
error(node, 'invalid-rune-args-length', rune, [0, 1]);
10771080
} else if (rune === '$props') {
10781081
if (state.has_props_rune) {

0 commit comments

Comments
 (0)