forked from mystiq/hydrogen-web
Check if options exist in emitChange
This commit is contained in:
parent
61b264be3b
commit
498a43327f
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 {
|
emitChange(changedProps: any): void {
|
||||||
if (this._options.emitChange) {
|
if (this._options?.emitChange) {
|
||||||
this._options.emitChange(changedProps);
|
this._options.emitChange(changedProps);
|
||||||
} else {
|
} else {
|
||||||
this.emit("change", changedProps);
|
this.emit("change", changedProps);
|
||||||
|
|
Loading…
Reference in a new issue