Skip to content

Commit b7b6991

Browse files
regenerate
1 parent a24f93f commit b7b6991

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

documentation/docs/98-reference/.generated/shared-errors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Certain lifecycle methods can only be used during component initialisation. To f
6363
### snippet_without_render_tag
6464

6565
```
66-
Attempted to render a snippet without a `{@render}` block. This would cause the snippet to be rendered directly to the DOM. To fix this, change `{snippet}` to `{@render snippet()}`.
66+
Attempted to render a snippet without a `{@render}` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change `{snippet}` to `{@render snippet()}`.
6767
```
6868

6969
A component throwing this error will look something like this (`children` is not being rendered):
@@ -81,9 +81,9 @@ A component throwing this error will look something like this (`children` is not
8181
```svelte
8282
<!--- file: Parent.svelte --->
8383
<ChildComponent>
84-
{#slot label()}
84+
{#snippet label()}
8585
<span>Hi!</span>
86-
{/slot}
86+
{/snippet}
8787
</ChildComponent>
8888
```
8989

packages/svelte/src/internal/shared/errors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ export function lifecycle_outside_component(name) {
4949
}
5050

5151
/**
52-
* Attempted to render a snippet without a `{@render}` block. This would cause the snippet to be rendered directly to the DOM. To fix this, change `{snippet}` to `{@render snippet()}`.
52+
* Attempted to render a snippet without a `{@render}` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change `{snippet}` to `{@render snippet()}`.
5353
* @returns {never}
5454
*/
5555
export function snippet_without_render_tag() {
5656
if (DEV) {
57-
const error = new Error(`snippet_without_render_tag\nAttempted to render a snippet without a \`{@render}\` block. This would cause the snippet to be rendered directly to the DOM. To fix this, change \`{snippet}\` to \`{@render snippet()}\`.\nhttps://svelte.dev/e/snippet_without_render_tag`);
57+
const error = new Error(`snippet_without_render_tag\nAttempted to render a snippet without a \`{@render}\` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change \`{snippet}\` to \`{@render snippet()}\`.\nhttps://svelte.dev/e/snippet_without_render_tag`);
5858

5959
error.name = 'Svelte error';
6060
throw error;

0 commit comments

Comments
 (0)