fix error message for snippet validation

pull/9395/head
Nayan Gautam 3 years ago
parent 6d74484655
commit 9e0c46b131

@ -119,7 +119,7 @@ export function add_snippet_symbol(fn) {
export function validate_snippet(snippet_fn) {
if (snippet_fn[symbol] !== true) {
throw new Error(
'The argument to `{@html ...}` must be a snippet function, not a component or some other kind of function. ' +
'The argument to `{@render ...}` must be a snippet function, not a component or some other kind of function. ' +
'If you want to dynamically render one snippet or another, use `$derived` and pass its result to `{@render ...}`.'
);
}

@ -5,6 +5,6 @@ export default test({
dev: true
},
error:
'The argument to `{@html ...}` must be a snippet function, not a component or some other kind of function. ' +
'The argument to `{@render ...}` must be a snippet function, not a component or some other kind of function. ' +
'If you want to dynamically render one snippet or another, use `$derived` and pass its result to `{@render ...}`.'
});

Loading…
Cancel
Save