diff --git a/Logic/UIEventSource.ts b/Logic/UIEventSource.ts index 7fa5a432d..d18cec86f 100644 --- a/Logic/UIEventSource.ts +++ b/Logic/UIEventSource.ts @@ -159,4 +159,11 @@ export class UIEventSource { return newSource; } + addCallbackAndRunD(callback: (data :T ) => void) { + this.addCallbackAndRun(data => { + if(data !== undefined && data !== null){ + callback(data) + } + }) + } } \ No newline at end of file