Fix bug with multianswers triggering an error

This commit is contained in:
Pieter Vander Vennet 2021-02-21 00:15:03 +01:00
parent 25be01b8ad
commit f4f7ae8f93
4 changed files with 9 additions and 22 deletions

View file

@ -86,12 +86,8 @@ export class UIEventSource<T> {
}
public ping(): void {
const old = this.data;
for (const callback of this._callbacks) {
callback(this.data);
if(this.data === undefined && old !== undefined){
throw "Something undefined the data!"
}
}
}