1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 10:38:54 +08:00

add test for closing browser tab

This commit is contained in:
lana-k
2021-02-04 16:19:25 +01:00
parent 9d38f2a047
commit 5006f6935a
2 changed files with 43 additions and 3 deletions

View File

@@ -86,9 +86,6 @@ export default {
created () {
window.addEventListener('beforeunload', this.leavingSqliteviz)
},
unmounted () {
window.removeEventListener('beforeunload', this.leavingSqliteviz)
},
methods: {
leavingSqliteviz (event) {
if (this.tabs.some(tab => tab.isUnsaved)) {