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",