forked from MapComplete/MapComplete
Fix: when using Chronic, check the aslong
condition before actually running instead of using it to reset the clock.
This commit is contained in:
parent
1415fcdfec
commit
10e9416f8f
1 changed files with 4 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue