forked from mystiq/hydrogen-web
Fix #97
This commit is contained in:
parent
2a106c5053
commit
2d4003379e
1 changed files with 5 additions and 2 deletions
|
@ -59,10 +59,13 @@ export class SimpleTile extends ViewModel {
|
|||
// TilesCollection contract below
|
||||
setUpdateEmit(emitUpdate) {
|
||||
this.updateOptions({emitChange: paramName => {
|
||||
// it can happen that after some network call
|
||||
// we switched away from the room and the response
|
||||
// comes in, triggering an emitChange in a tile that
|
||||
// has been disposed already (and hence the change
|
||||
// callback has been cleared by dispose) We should just ignore this.
|
||||
if (emitUpdate) {
|
||||
emitUpdate(this, paramName);
|
||||
} else {
|
||||
console.trace("Tile is emitting event after being disposed");
|
||||
}
|
||||
}});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue