fix: (@vue/apollo-option) memory leak in wrapped ssrRender (#1553)

This commit is contained in:
Matt Garrett
2024-08-14 07:39:44 -07:00
committed by GitHub
parent f0ab70883e
commit fceb40cd2c
+3
View File
@@ -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
}
},