fixed: receiving error if _this. is not defined #275 (#279)

* fixed: receiving error if _this. is not defined #275

* fixed: receiving error if _this. is not defined #275
This commit is contained in:
Loi Tran
2018-05-11 03:48:17 -07:00
committed by Guillaume Chau
parent 15f5c20471
commit 4eb30c780f
4 changed files with 19 additions and 4 deletions
+6 -1
View File
@@ -3921,7 +3921,12 @@ var launch = function launch() {
var _loop = function _loop(key) {
if (key.charAt(0) !== '$') {
if (!_this.hasOwnProperty(key) && !_this.$props.hasOwnProperty(key) && !_this.$data.hasOwnProperty(key)) {
var propHasKeyProperty = false;
if (typeof _this.$props !== 'undefined') {
propHasKeyProperty = _this.$props.hasOwnProperty(key);
}
if (!_this.hasOwnProperty(key) && !propHasKeyProperty && !_this.$data.hasOwnProperty(key)) {
Object.defineProperty(_this, key, {
get: function get$$1() {
return _this.$data.$apolloData.data[key];
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -1
View File
@@ -3927,7 +3927,12 @@ var launch = function launch() {
var _loop = function _loop(key) {
if (key.charAt(0) !== '$') {
if (!_this.hasOwnProperty(key) && !_this.$props.hasOwnProperty(key) && !_this.$data.hasOwnProperty(key)) {
var propHasKeyProperty = false;
if (typeof _this.$props !== 'undefined') {
propHasKeyProperty = _this.$props.hasOwnProperty(key);
}
if (!_this.hasOwnProperty(key) && !propHasKeyProperty && !_this.$data.hasOwnProperty(key)) {
Object.defineProperty(_this, key, {
get: function get$$1() {
return _this.$data.$apolloData.data[key];
+6 -1
View File
@@ -40,7 +40,12 @@ const launch = function launch () {
// watchQuery
for (let key in apollo) {
if (key.charAt(0) !== '$') {
if (!this.hasOwnProperty(key) && !this.$props.hasOwnProperty(key) && !this.$data.hasOwnProperty(key)) {
let propHasKeyProperty = false
if (typeof this.$props !== 'undefined') {
propHasKeyProperty = this.$props.hasOwnProperty(key)
}
if (!this.hasOwnProperty(key) && !propHasKeyProperty && !this.$data.hasOwnProperty(key)) {
Object.defineProperty(this, key, {
get: () => this.$data.$apolloData.data[key],
enumerable: true,