Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Commits on Aug 14, 2024

  1. fix: (@vue/apollo-option) memory leak in wrapped ssrRender

    Fixes vuejs#1550
    
    Two leaks were fixed:
    
    1) Prevents repeatedly wrapping `ssrRender` by checking if it's already
       been wrapped. Added a `__IS_VUE_APOLLO_WRAPPED` boolean to track this.
       I verified that this was actually happening by throwing an error if
       it was already wrapped, and I observed the error.
    
    2) `this.$options.ssrRender` doesn't always exist, but this.$apollo
       does. When the new wrapped `ssrRender` was called, it would throw,
       which prevented the `destroy.call(this)` line from running. The fix
       here was to not create a wrapped `ssrRender` if there isn't an original
       one.
    deleteme authored and Akryum committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    bec7e51 View commit details
    Browse the repository at this point in the history