checkpoint

This commit is contained in:
Rizky 2024-11-06 14:48:21 +07:00
parent f3cf18f673
commit c955fac585
2 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import pako, { gzip } from "pako";
import { fetchViaProxy, getProxyUrl } from "../proxy";
import { del, get, set } from "idb-keyval";
import { pack } from "msgpackr";
import { WS_CONFIG } from "../../../utils/sync/ws-client";
const schema_promise = {
tables: {} as Record<string, any>,
@ -202,6 +203,7 @@ export const fetchSendDb = async (
text = await res.text();
result = JSON.parse(text);
if (
WS_CONFIG.debug &&
typeof location === "object" &&
(["localhost", "prasi.avolut.com"].includes(location.hostname) ||
location.hostname.endsWith(".avolut.com"))

View File

@ -16,7 +16,7 @@ import { initIDB } from "./idb";
const packr = new Packr({ structuredClone: true });
/** CONSTANT */
const WS_CONFIG = {
export const WS_CONFIG = {
debug: !!localStorage.getItem("prasi-ws-debug"),
reconnectTimeout: 1000,
};