mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 11:10:42 +00:00
fix gameStop undefined error when refreshing page
This commit is contained in:
@@ -205,7 +205,7 @@
|
||||
* bugfix: when thread doesn't complete computation, do it in main DONE 12/3/2024
|
||||
* bugfix: when trade ships captured don't render DONE 12/3/2024
|
||||
* use mini A* for all pathfinding DONE 12/3/2024
|
||||
* bugfix: gameStop not found error
|
||||
* bugfix: gameStop not found error DONE 12/3/2024
|
||||
* record and replay games for debugging purposes
|
||||
* bugfix: destroyers can't find path to dst and freeze
|
||||
* log stack traces & display them on screen
|
||||
|
||||
+4
-4
@@ -32,7 +32,9 @@ class Client {
|
||||
const s = this.stopGame
|
||||
window.addEventListener('beforeunload', function (event) {
|
||||
console.log('Browser is closing');
|
||||
s()
|
||||
if (s != null) {
|
||||
s()
|
||||
}
|
||||
});
|
||||
|
||||
setFavicon()
|
||||
@@ -84,9 +86,7 @@ class Client {
|
||||
}
|
||||
|
||||
private stopGame() {
|
||||
if (this.gameStop != null) {
|
||||
this.gameStop()
|
||||
}
|
||||
this?.gameStop?.()
|
||||
}
|
||||
|
||||
private async handleLeaveLobby(event: CustomEvent) {
|
||||
|
||||
Reference in New Issue
Block a user