fix decrypted tiles not corresponding to a tile

This commit is contained in:
Bruno Windels 2020-09-18 13:36:16 +02:00
parent 4d604f7357
commit 1d33ab20a5

View file

@ -145,7 +145,12 @@ export class TilesCollection extends BaseObservableList {
if (tile) {
const action = tile.updateEntry(entry, params);
if (action.shouldReplace) {
this._replaceTile(tileIdx, tile, this._tileCreator(entry));
const newTile = this._tileCreator(entry);
if (newTile) {
this._replaceTile(tileIdx, tile, newTile);
} else {
this._removeTile(tileIdx, tile);
}
}
if (action.shouldRemove) {
this._removeTile(tileIdx, tile);