fix
This commit is contained in:
parent
88558f4472
commit
2e51328883
|
|
@ -164,7 +164,6 @@ const connect = (
|
|||
} else {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
if (!conf.ws) {
|
||||
let reconnect = 0;
|
||||
const retry = () => {
|
||||
const url = new URL(w.basehost || location.href);
|
||||
url.pathname = "/sync";
|
||||
|
|
|
|||
|
|
@ -19,10 +19,9 @@
|
|||
"pkgs/*"
|
||||
],
|
||||
"dependencies": {
|
||||
"@shikijs/core": "^1.12.1",
|
||||
"brotli-wasm": "^3.0.1",
|
||||
"fdir": "^6.1.0",
|
||||
"fdir": "^6.2.0",
|
||||
"react-select": "^5.8.0",
|
||||
"typescript": "^5.2.2"
|
||||
"typescript": "^5.5.4"
|
||||
}
|
||||
}
|
||||
|
|
@ -64,11 +64,14 @@ export const useLocal = <T extends object>(
|
|||
if (local.lastRenderCount > 300) {
|
||||
clearTimeout(local.overRenderTimeout);
|
||||
local.overRenderTimeout = setTimeout(() => {
|
||||
local.lastRenderCount = 0;
|
||||
local.lastRender = Date.now();
|
||||
_render({});
|
||||
}, 1000);
|
||||
|
||||
console.error("local.render more than 300 times in less than 300ms");
|
||||
console.error(
|
||||
`local.render executed ${local.lastRenderCount} times in less than 300ms`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue