From d29f5041953a91ac799cca078acdae2c4acb9dd7 Mon Sep 17 00:00:00 2001 From: code1492 Date: Sat, 7 Jan 2017 02:02:48 +0900 Subject: [PATCH 1/3] property "constructor" in data with error fixed. Fixed an error when declaring property "constructor" in data. --- shells/chrome/src/detector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shells/chrome/src/detector.js b/shells/chrome/src/detector.js index 0319243ab..bfa6f462c 100644 --- a/shells/chrome/src/detector.js +++ b/shells/chrome/src/detector.js @@ -9,7 +9,7 @@ function detect (win) { const all = document.querySelectorAll('*') const el = [].find.call(all, e => e.__vue__) if (el) { - let Vue = el.__vue__.constructor + let Vue = el.__vue__.prototype.constructor while (Vue.super) { Vue = Vue.super } From be4172e17914a6585bf5743c7f4ead088409f5a0 Mon Sep 17 00:00:00 2001 From: code1492 Date: Sat, 7 Jan 2017 10:41:55 +0900 Subject: [PATCH 2/3] Update detector.js --- shells/chrome/src/detector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shells/chrome/src/detector.js b/shells/chrome/src/detector.js index bfa6f462c..ff16d8b4a 100644 --- a/shells/chrome/src/detector.js +++ b/shells/chrome/src/detector.js @@ -9,7 +9,7 @@ function detect (win) { const all = document.querySelectorAll('*') const el = [].find.call(all, e => e.__vue__) if (el) { - let Vue = el.__vue__.prototype.constructor + let Vue = el.__vue__.__proto__.constructor while (Vue.super) { Vue = Vue.super } From b6cc10ef12298714a5522a24ef652162cc636f95 Mon Sep 17 00:00:00 2001 From: code1492 Date: Mon, 13 Feb 2017 23:22:14 +0900 Subject: [PATCH 3/3] change '__proto__' to 'Object.getPrototypeOf' Object.getPrototypeOf(el.__vue__) el.__vue__.__proto__ --- shells/chrome/src/detector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shells/chrome/src/detector.js b/shells/chrome/src/detector.js index ff16d8b4a..181f3229d 100644 --- a/shells/chrome/src/detector.js +++ b/shells/chrome/src/detector.js @@ -9,7 +9,7 @@ function detect (win) { const all = document.querySelectorAll('*') const el = [].find.call(all, e => e.__vue__) if (el) { - let Vue = el.__vue__.__proto__.constructor + let Vue = Object.getPrototypeOf(el.__vue__).constructor while (Vue.super) { Vue = Vue.super }