Skip to content

Commit

Permalink
Fix memory leak issue
Browse files Browse the repository at this point in the history
  • Loading branch information
woutdp committed Jan 17, 2024
1 parent 3ff446f commit e46e85d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions assets/js/live_svelte/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ export function getHooks(components) {
},

destroyed() {
// We don't want to destroy the component
// If we do a page navigation, this would remove the component in the DOM,
// and then it would to the transition, causing a flicker of unrendered content
// Since we're doing a page transition anyway, the component will be remove automatically
this._instance.$destroy()
},
}

Expand Down

0 comments on commit e46e85d

Please sign in to comment.