Remove warning from cache attaching if the tile has already reference.

This commit is contained in:
Aiosa 2024-11-21 15:48:11 +01:00
parent 0bc7deccd7
commit 1851405fcf

View File

@ -450,14 +450,17 @@
this._type = type;
}
this._tiles.push(tile);
} else if (!this._tiles.includes(tile) && this.type && this._promise) {
} else {
const tileExists = this._tiles.includes(tile);
if (!tileExists && this.type && this._promise) {
// here really check we are loaded, since if optimization allows sending no data and we add tile without
// proper initialization it is a bug
this._tiles.push(tile);
} else {
} else if (!tileExists) {
$.console.warn("Tile %s caching attempt without data argument on uninitialized cache entry!", tile);
}
}
}
/**
* Remove tile dependency on this record.