fix(ApolloQuery): prefetch prop to false freezing server

This commit is contained in:
Guillaume Chau
2019-05-02 18:22:24 +02:00
parent c2ad4d14fb
commit 4ef96c2e4d
+2 -1
View File
@@ -1,4 +1,4 @@
import { Globals } from '../lib/utils'
import { Globals, reapply } from '../lib/utils'
function hasProperty (holder, key) {
return typeof holder !== 'undefined' && Object.prototype.hasOwnProperty.call(holder, key)
@@ -91,6 +91,7 @@ function launch () {
if (key.charAt(0) !== '$') {
let options = apollo[key]
const smart = this.$apollo.addSmartQuery(key, options)
options = reapply(options, this)
if (options.prefetch !== false && apollo.$prefetch !== false && !smart.skip) {
this.$_apolloPromises.push(smart.firstRun)
}