Fix client flashing (#125)

This commit is contained in:
Louis Smit 2024-05-21 16:39:03 +02:00 committed by Wout De Puysseleir
parent d4e3c14036
commit 72be602d79

View file

@ -122,7 +122,9 @@ export function getHooks(components) {
},
destroyed() {
this._instance.$destroy()
if (this._instance) {
window.addEventListener("phx:page-loading-stop", () => this._instance.$destroy(), {once: true})
}
},
}