forked from MapComplete/MapComplete
		
	Add addCallbackAndRunD which ignores undefeind and null values
This commit is contained in:
		
							parent
							
								
									5e84b00ca2
								
							
						
					
					
						commit
						d7e421efc9
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -159,4 +159,11 @@ export class UIEventSource<T> { | |||
|         return newSource; | ||||
|     } | ||||
| 
 | ||||
|     addCallbackAndRunD(callback: (data :T ) => void) { | ||||
|         this.addCallbackAndRun(data => { | ||||
|             if(data !== undefined && data !== null){ | ||||
|                 callback(data) | ||||
|             } | ||||
|         }) | ||||
|     } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue