Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
```
Loading