From 833924a266e06445813dde84f1258b79e068787b Mon Sep 17 00:00:00 2001 From: * <8> Date: Wed, 20 Jul 2022 18:11:46 +0800 Subject: [PATCH] Match-id-115bebf43eab1244103444f60137a69758e795c8 --- babel.config.js | 1 + libs/horizon/src/horizonx/proxy/readonlyProxy.ts | 4 +++- package.json | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/babel.config.js b/babel.config.js index 8e19cfcb..9f82d978 100644 --- a/babel.config.js +++ b/babel.config.js @@ -11,6 +11,7 @@ module.exports = { { loose: true, useBuiltIns: true }, ], ['@babel/plugin-transform-template-literals', { loose: true }], + '@babel/plugin-transform-object-assign', '@babel/plugin-transform-literals', '@babel/plugin-transform-arrow-functions', '@babel/plugin-transform-block-scoped-functions', diff --git a/libs/horizon/src/horizonx/proxy/readonlyProxy.ts b/libs/horizon/src/horizonx/proxy/readonlyProxy.ts index 65361c6a..cd848c1f 100644 --- a/libs/horizon/src/horizonx/proxy/readonlyProxy.ts +++ b/libs/horizon/src/horizonx/proxy/readonlyProxy.ts @@ -8,7 +8,9 @@ export function readonlyProxy(target: T): ProxyHandler { if (isObject(result)) { return readonlyProxy(result); } - } catch {} + } catch(err) { + // 不处理 + } return result; }, diff --git a/package.json b/package.json index e4b4229a..fe9836de 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "@babel/plugin-transform-destructuring": "7.16.7", "@babel/plugin-transform-for-of": "7.16.7", "@babel/plugin-transform-literals": "7.16.7", + "@babel/plugin-transform-object-assign": "7.16.7", "@babel/plugin-transform-object-super": "7.16.7", "@babel/plugin-transform-parameters": "7.16.7", "@babel/plugin-transform-runtime": "7.16.7",