forked from mystiq/hydrogen-web
Merge pull request #678 from vector-im/fix-viewmodel-error
Check options exist on emitChange
This commit is contained in:
commit
d971fd1a47
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ export class ViewModel<O extends Options = Options> extends EventEmitter<{change
|
|||
}
|
||||
|
||||
emitChange(changedProps: any): void {
|
||||
if (this._options.emitChange) {
|
||||
if (this._options?.emitChange) {
|
||||
this._options.emitChange(changedProps);
|
||||
} else {
|
||||
this.emit("change", changedProps);
|
||||
|
|
Loading…
Reference in a new issue