From e403e2931252cf22e85fca2491270ee3f00fea2f Mon Sep 17 00:00:00 2001 From: Aiosa <469130@mail.muni.cz> Date: Mon, 21 Oct 2024 12:59:21 +0200 Subject: [PATCH] Fix tests: bug in type equality checking --- src/tilecache.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tilecache.js b/src/tilecache.js index 1c370cc9..87aca50c 100644 --- a/src/tilecache.js +++ b/src/tilecache.js @@ -302,7 +302,7 @@ return; } //must re-check types since we perform in a queue of conversion requests - if (type !== this._type || (Array.isArray(type) && !type.includes(this._type))) { + if ((typeof type === "string" && type !== this._type) || (Array.isArray(type) && !type.includes(this._type))) { //ensures queue gets executed after finish this._convert(this._type, type); this._promise.then(data => resolver(data)); @@ -317,7 +317,7 @@ return promise; } - if (type !== this._type || (Array.isArray(type) && !type.includes(this._type))) { + if ((typeof type === "string" && type !== this._type) || (Array.isArray(type) && !type.includes(this._type))) { this._convert(this._type, type); } return this._promise;