try fix with check for null and undefined

This commit is contained in:
Dragos Daian 2023-01-23 22:10:23 +01:00
parent 5d70a807da
commit f0f12c459e

View File

@ -234,7 +234,7 @@ $.ImageLoader.prototype = {
* @param callback - Called once cleanup is finished.
*/
function completeJob(loader, job, callback) {
if (job.errorMsg !== '' && job.image === null && job.tries < 1 + loader.tileRetryMax) {
if (job.errorMsg !== '' && (job.image === null || job.image === undefined) && job.tries < 1 + loader.tileRetryMax) {
loader.failedTiles.push(job);
}
var nextJob;