Skip to content

Commit

Permalink
fix docs (#14635)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris authored Dec 9, 2024
1 parent c6fca02 commit 3dcd5a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions documentation/docs/98-reference/.generated/shared-warnings.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ The following properties cannot be cloned with `$state.snapshot` — the return
`$state.snapshot` tries to clone the given value in order to return a reference that no longer changes. Certain objects may not be cloneable, in which case the original value is returned. In the following example, `property` is cloned, but `window` is not, because DOM elements are uncloneable:

```js
const state = $state({ property: 'this is cloneable', window })
const snapshot = $state.snapshot();
const object = $state({ property: 'this is cloneable', window })
const snapshot = $state.snapshot(object);
```
4 changes: 2 additions & 2 deletions packages/svelte/messages/shared-warnings/warnings.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ Elements such as `<input>` cannot have content, any children passed to these ele
`$state.snapshot` tries to clone the given value in order to return a reference that no longer changes. Certain objects may not be cloneable, in which case the original value is returned. In the following example, `property` is cloned, but `window` is not, because DOM elements are uncloneable:

```js
const state = $state({ property: 'this is cloneable', window })
const snapshot = $state.snapshot();
const object = $state({ property: 'this is cloneable', window })
const snapshot = $state.snapshot(object);
```

0 comments on commit 3dcd5a4

Please sign in to comment.