From 27ae2964eece63b4835d2d999490fcf2ca846346 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 14 May 2024 15:54:18 -0400 Subject: [PATCH] fix --- packages/svelte/src/internal/client/dev/equality.js | 2 +- packages/svelte/src/internal/client/warnings.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/svelte/src/internal/client/dev/equality.js b/packages/svelte/src/internal/client/dev/equality.js index 4e649ee095..cb3428c3ef 100644 --- a/packages/svelte/src/internal/client/dev/equality.js +++ b/packages/svelte/src/internal/client/dev/equality.js @@ -1,6 +1,6 @@ import { DEV } from 'esm-env'; import * as w from '../warnings.js'; -import { get_proxied_value } from '../proxy'; +import { get_proxied_value } from '../proxy.js'; export function init_array_prototype_warnings() { const array_prototype = Array.prototype; diff --git a/packages/svelte/src/internal/client/warnings.js b/packages/svelte/src/internal/client/warnings.js index c4e0376cff..6b6f27ac6e 100644 --- a/packages/svelte/src/internal/client/warnings.js +++ b/packages/svelte/src/internal/client/warnings.js @@ -74,12 +74,12 @@ export function ownership_invalid_mutation(component, owner) { } /** - * Detected an equality check between a $state proxy and a non-$state-proxy object for %method%. This equality check will always fail because the proxy has a different object identity. To ensure both operands are of the same kind for accurate results, consider using the `$state.is(a, b)` rune. + * Detected an equality check between a $state proxy and a non-$state-proxy object for %method%. This equality check will always fail because the proxy has a different object identity. To ensure both operands are of the same kind for accurate results, consider using `$state.is(a, b)`. * @param {string} method */ export function state_proxy_equality_mismatch(method) { if (DEV) { - console.warn(`%c[svelte] ${"state_proxy_equality_mismatch"}\n%c${`Detected an equality check between a $state proxy and a non-$state-proxy object for ${method}. This equality check will always fail because the proxy has a different object identity. To ensure both operands are of the same kind for accurate results, consider using the \`$state.is(a, b)\` rune.`}`, bold, normal); + console.warn(`%c[svelte] ${"state_proxy_equality_mismatch"}\n%c${`Detected an equality check between a $state proxy and a non-$state-proxy object for ${method}. This equality check will always fail because the proxy has a different object identity. To ensure both operands are of the same kind for accurate results, consider using \`$state.is(a, b)\`.`}`, bold, normal); } else { // TODO print a link to the documentation console.warn("state_proxy_equality_mismatch");