Skip to content

Commit b1bf8b3

Browse files
committed
warn before close if there are running tasks
1 parent 0dbb0d1 commit b1bf8b3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

client/src/redux/services.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ const connectExtension = async () => {
1313

1414
instagram.kill()
1515

16+
window.onbeforeunload = () => {
17+
if (!instagram.isStopped) {
18+
console.log(`You have tasks running. They will not continue if you leave now. You sure?`)
19+
return true
20+
}
21+
}
22+
1623
if (user && user.pk) {
1724
return {
1825
user,

0 commit comments

Comments
 (0)