Skip to content

Commit

Permalink
fix(ssr): memory leak, closes nuxt-modules/apollo#231
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Oct 21, 2019
1 parent 7733edc commit c3b840c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ export function installMixin (Vue, vueVersion) {

serverPrefetch () {
if (this.$_apolloPromises) {
return Promise.all(this.$_apolloPromises)
return Promise.all(this.$_apolloPromises).then(result => {
// Destroy DollarApollo after SSR promises are resolved
destroy.call(this)
return result
})
}
},
} : {},
Expand Down

0 comments on commit c3b840c

Please sign in to comment.