From 96570a169a68de12d922e6a2cd4571c30611e393 Mon Sep 17 00:00:00 2001 From: Dustin B Date: Wed, 7 Feb 2018 10:40:43 -0800 Subject: [PATCH] Don't require the key to match the query name (#186) 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 c9c174d..7bd5aef 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]