Skip to content

Commit

Permalink
prevents reloading modal from over popping on browser
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanOXDi committed Jul 12, 2024
1 parent 32d81de commit ba094b5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@
}
this.quizInitialized = true;
},
destroy() {
window.removeEventListener('beforeunload', this.onBeforeUnload)
},
methods: {
beforeUnload(e) {
if (this.quizHasChanged) {
Expand Down

0 comments on commit ba094b5

Please sign in to comment.