Skip to content

Commit

Permalink
Version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Sep 14, 2017
1 parent be7ad37 commit 5fdea10
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
8 changes: 6 additions & 2 deletions dist/vue-apollo.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2798,17 +2798,21 @@ var SmartQuery = function (_SmartApollo) {
this.loadingDone();
}

var hasResultCallback = typeof this.options.result === 'function';

if (typeof data === 'undefined') {
// No result
} else if (typeof this.options.update === 'function') {
this.vm[this.key] = this.options.update.call(this.vm, data);
} else if (data[this.key] === undefined) {
console.error('Missing ' + this.key + ' attribute on result', data);
} else {
} else if (!this.options.manual) {
this.vm[this.key] = data[this.key];
} else if (!hasResultCallback) {
console.error(this.key + ' query must have a \'result\' hook in manual mode');
}

if (typeof this.options.result === 'function') {
if (hasResultCallback) {
this.options.result.call(this.vm, result);
}
}
Expand Down
Loading

0 comments on commit 5fdea10

Please sign in to comment.