We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b64fb09 commit 5193f2cCopy full SHA for 5193f2c
packages/svelte/src/internal/client/proxy.js
@@ -298,14 +298,13 @@ export function proxy(value) {
298
* @returns {T | void}
299
*/
300
export function return_proxy(value) {
301
- if (
302
- !should_proxy(value) &&
303
- !(typeof value === 'object' && value !== null && STATE_SYMBOL in value)
304
- ) {
305
- // if the argument passed was already a proxy, we don't warn
+ if (should_proxy(value)) {
306
return proxy(value);
+ } else if (DEV && !(typeof value === 'object' && value !== null && STATE_SYMBOL in value)) {
+ // if the argument passed was already a proxy, we don't warn
+ w.state_return_not_proxyable();
307
}
308
- w.state_return_not_proxyable();
+ return value;
309
310
311
/**
0 commit comments