diff --git a/documentation/docs/98-reference/.generated/shared-warnings.md b/documentation/docs/98-reference/.generated/shared-warnings.md index 2d23e68948..f449a4031e 100644 --- a/documentation/docs/98-reference/.generated/shared-warnings.md +++ b/documentation/docs/98-reference/.generated/shared-warnings.md @@ -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); ``` diff --git a/packages/svelte/messages/shared-warnings/warnings.md b/packages/svelte/messages/shared-warnings/warnings.md index c76fb10cdf..fb27867f9b 100644 --- a/packages/svelte/messages/shared-warnings/warnings.md +++ b/packages/svelte/messages/shared-warnings/warnings.md @@ -15,6 +15,6 @@ Elements such as `` 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); ```