diff --git a/src/utils/proxyInner.ts b/src/utils/proxyInner.ts index 76eb06f1e..d02517882 100644 --- a/src/utils/proxyInner.ts +++ b/src/utils/proxyInner.ts @@ -23,6 +23,10 @@ const handler: ProxyHandler = { [propName, (target: any, ...args: any[]) => Reflect[propName](target[proxyInnerGet](), ...args)] )), set: (target, p, value) => { + if (p === Symbol.toStringTag) { + return Reflect.set(target, p, value, target); + } + const innerTarget = target[proxyInnerGet](); return Reflect.set(innerTarget, p, value, innerTarget); }, @@ -98,7 +102,6 @@ export function proxyInner( } throw new Error(primitiveErrMsg); - } });