fix: prompt user before reloading on socket closure
This commit is contained in:
parent
de235d9a27
commit
0b5bf25efb
1 changed files with 4 additions and 1 deletions
|
@ -34,7 +34,10 @@ class Socket extends EventTarget {
|
|||
};
|
||||
|
||||
this._socket.onclose = () => {
|
||||
location.reload();
|
||||
const willRefresh = confirm("Realtime Data Connection closed\nWould you like to reconnect?");
|
||||
if (willRefresh) {
|
||||
location.reload();
|
||||
}
|
||||
};
|
||||
|
||||
setInterval(() => {
|
||||
|
|
Loading…
Add table
Reference in a new issue