Akryum / vue-virtual-scroller

⚡️ Blazing fast scrolling for any amount of data
https://vue-virtual-scroller-demo.netlify.app
9.36k stars 896 forks source link

fix: issue with beforeDestroy hook #748

Closed dsvs12 closed 1 year ago

dsvs12 commented 1 year ago

This fixes the issue when the dynamic scroller disappears out of view and the this.$el.parentNode returns nothing causing the observer to have issues, stack trace for current issue follows

[Vue warn]: Error in beforeDestroy hook: "TypeError: Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element'."

found in

---> <DynamicScrollerItem>
       <RecycleScroller>
         <DynamicScroller>
           <SeatSelect> at src/components/SeatSelectComponent.vue
             <Event> at src/views/Event.vue
               <App> at src/App.vue
                 <Root>