Fix: when using Chronic, check the aslong condition before actually running instead of using it to reset the clock.

This commit is contained in:
Pieter Vander Vennet 2024-11-03 19:02:16 +01:00
parent 1415fcdfec
commit 10e9416f8f

View file

@ -9,13 +9,14 @@ export class Stores {
const source = new UIEventSource<Date>(undefined)
function run() {
if(asLong !== undefined && !asLong()){
return
}
source.setData(new Date())
if (Utils.runningFromConsole) {
return
}
if (asLong === undefined || asLong()) {
window.setTimeout(run, millis)
}
window.setTimeout(run, millis)
}
run()