From 3dcd5a4a3eeed2a3d9c7a4449b928f1c1e2a36a6 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 9 Dec 2024 12:55:39 -0500 Subject: [PATCH] fix docs (#14635) --- documentation/docs/98-reference/.generated/shared-warnings.md | 4 ++-- packages/svelte/messages/shared-warnings/warnings.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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); ```