From 8cbeed5f053486b2e81fa40e853fec789f404ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=91=9E?= <412285675@qq.com> Date: Wed, 12 Sep 2018 16:03:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20fix=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/fix/fix.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dist/fix/fix.js b/dist/fix/fix.js index 84f349a2e1..94074b034b 100644 --- a/dist/fix/fix.js +++ b/dist/fix/fix.js @@ -456,11 +456,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons var ob = void 0; if (value.__ob__ instanceof Observer) { ob = value.__ob__; - } else if (observerState.shouldConvert && (_.isArray(value) || isPlainObject(value))) { + } else if (observerState.shouldConvert && Object.isExtensible(value) && (_.isArray(value) || isPlainObject(value))) { ob = new Observer(value); } - ob.parent = parentObserver || ob.parent; - ob.parentKey = parentKey; + if (ob) { + ob.parent = parentObserver || ob.parent; + ob.parentKey = parentKey; + } return ob; }