Skip to content

Commit

Permalink
fix: (@vue/apollo-option) memory leak in wrapped ssrRender (#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
deleteme authored Aug 14, 2024
1 parent f0ab708 commit fceb40c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vue-apollo-option/src/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,14 @@ export function installMixin (app, provider) {
if (isServer) {
// Patch render function to cleanup apollo
const render = this.$options.ssrRender
if (!render) return
if (render.__IS_VUE_APOLLO_WRAPPED) return
this.$options.ssrRender = (h) => {
const result = render.call(this, h)
destroy.call(this)
return result
}
this.$options.ssrRender.__IS_VUE_APOLLO_WRAPPED = true
}
},

Expand Down

0 comments on commit fceb40c

Please sign in to comment.