mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
Fix #97
This commit is contained in:
parent
2a106c5053
commit
2d4003379e
@ -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 New Issue
Block a user