Skip to content

Commit 9e0c46b

Browse files
committed
fix error message for snippet validation
1 parent 6d74484 commit 9e0c46b

File tree

2 files changed

+2
-2
lines changed
  • packages/svelte

2 files changed

+2
-2
lines changed

packages/svelte/src/internal/client/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export function add_snippet_symbol(fn) {
119119
export function validate_snippet(snippet_fn) {
120120
if (snippet_fn[symbol] !== true) {
121121
throw new Error(
122-
'The argument to `{@html ...}` must be a snippet function, not a component or some other kind of function. ' +
122+
'The argument to `{@render ...}` must be a snippet function, not a component or some other kind of function. ' +
123123
'If you want to dynamically render one snippet or another, use `$derived` and pass its result to `{@render ...}`.'
124124
);
125125
}

packages/svelte/tests/runtime-runes/samples/snippet-validation-error/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ export default test({
55
dev: true
66
},
77
error:
8-
'The argument to `{@html ...}` must be a snippet function, not a component or some other kind of function. ' +
8+
'The argument to `{@render ...}` must be a snippet function, not a component or some other kind of function. ' +
99
'If you want to dynamically render one snippet or another, use `$derived` and pass its result to `{@render ...}`.'
1010
});

0 commit comments

Comments
 (0)