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,14 +9,15 @@ 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) | ||||
|         } | ||||
|         } | ||||
| 
 | ||||
|         run() | ||||
|         return source | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue