Attempt to fix bigint serialization issue (#1501)

## Description:

Attempt to fix bigint serialization issue

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [ ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [ ] I have read and accepted the CLA aggreement (only required once).
This commit is contained in:
Scott Anderson
2025-07-19 21:35:57 -04:00
committed by GitHub
parent 11e92246f2
commit 123787e299
4 changed files with 18 additions and 12 deletions
+14 -10
View File
@@ -103,7 +103,7 @@ export function joinLobby(
if (message.type === "error") {
showErrorModal(
message.error,
"",
message.message,
lobbyConfig.gameID,
lobbyConfig.clientID,
true,
@@ -329,7 +329,7 @@ export class ClientGameRunner {
if (message.type === "error") {
showErrorModal(
message.error,
"",
message.message,
this.lobby.gameID,
this.lobby.clientID,
true,
@@ -582,27 +582,31 @@ export class ClientGameRunner {
}
function showErrorModal(
errMsg: string,
stack: string,
error: string,
message: string | undefined,
gameID: GameID,
clientID: ClientID,
closable = false,
showDiscord = true,
heading = "error_modal.crashed",
) {
const errorText = `Error: ${errMsg}\nStack: ${stack}`;
if (document.querySelector("#error-modal")) {
return;
}
const modal = document.createElement("div");
modal.id = "error-modal";
const discord = showDiscord ? translateText("error_modal.paste_discord") : "";
const content = `${discord}\n${translateText(heading)}\n game id: ${gameID}, client id: ${clientID}\n${errorText}`;
const content = [
showDiscord ? translateText("error_modal.paste_discord") : null,
translateText(heading),
`game id: ${gameID}`,
`client id: ${clientID}`,
`Error: ${error}`,
message ? `Message: ${message}` : null,
]
.filter(Boolean)
.join("\n");
// Create elements
const pre = document.createElement("pre");