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) |         const source = new UIEventSource<Date>(undefined) | ||||||
| 
 | 
 | ||||||
|         function run() { |         function run() { | ||||||
|  |             if(asLong !== undefined && !asLong()){ | ||||||
|  |                 return | ||||||
|  |             } | ||||||
|             source.setData(new Date()) |             source.setData(new Date()) | ||||||
|             if (Utils.runningFromConsole) { |             if (Utils.runningFromConsole) { | ||||||
|                 return |                 return | ||||||
|             } |             } | ||||||
|             if (asLong === undefined || asLong()) { |             window.setTimeout(run, millis) | ||||||
|                 window.setTimeout(run, millis) |  | ||||||
|             } |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         run() |         run() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue