Skip to content

Commit 9e5f992

Browse files
committed
remove vestiges
1 parent 9afc5dc commit 9e5f992

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/svelte/src/internal/client/runtime.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,26 +1166,26 @@ export function deep_read(value, visited = new Set()) {
11661166
}
11671167

11681168
/**
1169-
* Like `unstate`, but recursively traverses into normal arrays/objects to find potential states in them.
1169+
* Like `snapshot`, but recursively traverses into normal arrays/objects to find potential states in them.
11701170
* @param {any} value
11711171
* @param {Map<any, any>} visited
11721172
* @returns {any}
11731173
*/
1174-
function deep_unstate(value, visited = new Map()) {
1174+
function deep_snapshot(value, visited = new Map()) {
11751175
if (typeof value === 'object' && value !== null && !visited.has(value)) {
11761176
const unstated = snapshot(value);
11771177
if (unstated !== value) {
11781178
visited.set(value, unstated);
11791179
return unstated;
11801180
}
11811181
const prototype = get_prototype_of(value);
1182-
// Only deeply unstate plain objects and arrays
1182+
// Only deeply snapshot plain objects and arrays
11831183
if (prototype === object_prototype || prototype === array_prototype) {
11841184
let contains_unstated = false;
11851185
/** @type {any} */
11861186
const nested_unstated = Array.isArray(value) ? [] : {};
11871187
for (let key in value) {
1188-
const result = deep_unstate(value[key], visited);
1188+
const result = deep_snapshot(value[key], visited);
11891189
nested_unstated[key] = result;
11901190
if (result !== value[key]) {
11911191
contains_unstated = true;
@@ -1213,7 +1213,7 @@ export function inspect(get_value, inspect = console.log) {
12131213

12141214
user_pre_effect(() => {
12151215
const fn = () => {
1216-
const value = untrack(() => get_value().map((v) => deep_unstate(v)));
1216+
const value = untrack(() => get_value().map((v) => deep_snapshot(v)));
12171217
if (value.length === 2 && typeof value[1] === 'function' && !warned_inspect_changed) {
12181218
// eslint-disable-next-line no-console
12191219
console.warn(
@@ -1301,7 +1301,7 @@ if (DEV) {
13011301
*/
13021302
export function freeze(value) {
13031303
if (typeof value === 'object' && value != null && !is_frozen(value)) {
1304-
// If the object is already proxified, then unstate the value
1304+
// If the object is already proxified, then snapshot the value
13051305
if (STATE_SYMBOL in value) {
13061306
return object_freeze(snapshot(value));
13071307
}

0 commit comments

Comments
 (0)