Fix Bridge TypeScript Navigation Release Mode

* More inf: https://github.com/webui-dev/zig-webui/pull/58#issuecomment-2226417695
This commit is contained in:
Hassan DRAGA 2024-07-12 20:38:08 -04:00
parent ecccc7e820
commit 2e94629304
2 changed files with 543 additions and 545 deletions

View File

@ -516,11 +516,9 @@ class WebuiBridge {
#wsOnClose = (event: CloseEvent) => {
if (this.#closeReason === this.#CMD_NAVIGATION) {
this.#closeReason = 0;
if (this.#log) {
console.log(`WebUI -> Connection lost. Navigation to [${this.#closeValue}]`);
this.#allowNavigation = true;
globalThis.location.replace(this.#closeValue);
}
if (this.#log) console.log(`WebUI -> Connection lost. Navigation to [${this.#closeValue}]`);
this.#allowNavigation = true;
globalThis.location.replace(this.#closeValue);
} else {
if (this.#wsStayAlive) {
// Re-connect

File diff suppressed because it is too large Load Diff