expand line width, remove redundant if statement
This commit is contained in:
parent
a3a5b2ba73
commit
0f16965ed9
@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
"fmt": { "indentWidth": 4 },
|
"fmt": {
|
||||||
|
"indentWidth": 4,
|
||||||
|
"lineWidth": 100
|
||||||
|
},
|
||||||
"lib": ["dom", "dom.iterable", "dom.asynciterable", "deno.ns"]
|
"lib": ["dom", "dom.iterable", "dom.asynciterable", "deno.ns"]
|
||||||
}
|
}
|
||||||
|
14
js/lib.js
14
js/lib.js
@ -41,13 +41,11 @@ export function startGameLoop(loopFunction) {
|
|||||||
}, 16);
|
}, 16);
|
||||||
|
|
||||||
const abortSignal = globalThis.libInternalAbortController.signal;
|
const abortSignal = globalThis.libInternalAbortController.signal;
|
||||||
if (abortSignal) {
|
if (abortSignal.aborted) {
|
||||||
if (abortSignal.aborted) {
|
clearInterval(loopInterval);
|
||||||
clearInterval(loopInterval);
|
|
||||||
}
|
|
||||||
|
|
||||||
abortSignal.addEventListener("abort", () => {
|
|
||||||
clearInterval(loopInterval);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abortSignal.addEventListener("abort", () => {
|
||||||
|
clearInterval(loopInterval);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user