From e878531d59e9a078bd5ac7bbf6b5080c78d49696 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 9 Dec 2024 12:55:09 -0500 Subject: [PATCH] fix docs --- 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 2d23e68948be..f449a4031ebf 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 c76fb10cdf8b..fb27867f9bf3 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); ```