From 07e55b14817e2049732cc42ebfeba7a5e0672b1b Mon Sep 17 00:00:00 2001 From: Dustin B Date: Wed, 17 Jan 2018 00:29:54 -0800 Subject: [PATCH] Don't require the key to match the query name In "manual" mode, the user is setting the manually working with the value, so an error should not be thrown if the key isn't present in the response. --- src/smart-apollo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/smart-apollo.js b/src/smart-apollo.js index c9c174d7..7bd5aef7 100644 --- a/src/smart-apollo.js +++ b/src/smart-apollo.js @@ -232,7 +232,7 @@ export class SmartQuery extends SmartApollo { // 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) { + } else if (data[this.key] === undefined && !this.options.manual) { console.error(`Missing ${this.key} attribute on result`, data) } else if (!this.options.manual) { this.vm[this.key] = data[this.key]