From abc88ab5c0a8f5c7610e1a834aebea7d22e2b91d Mon Sep 17 00:00:00 2001 From: likechris Date: Sat, 8 Jun 2019 01:35:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:use=20mobx=20=EF=BC=8Cwhen=20Proxy=20=20pro?= =?UTF-8?q?perty=20is=20array=20not=20allowed=20modify=20=5F=5Fproto=5F=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/observer/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/observer/index.js b/src/core/observer/index.js index 545adb64025..1a85d352604 100644 --- a/src/core/observer/index.js +++ b/src/core/observer/index.js @@ -86,8 +86,12 @@ export class Observer { */ function protoAugment (target, src: Object) { /* eslint-disable no-proto */ - target.__proto__ = src - /* eslint-enable no-proto */ + try { + target.__proto__ = src + } catch (error) { + warn(error) + } + /* eslint-enable no-proto */ } /**