mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-12-01 17:46:07 +03:00
Fix tests: bug in type equality checking
This commit is contained in:
parent
82e1160508
commit
e403e29312
@ -302,7 +302,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//must re-check types since we perform in a queue of conversion requests
|
//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
|
//ensures queue gets executed after finish
|
||||||
this._convert(this._type, type);
|
this._convert(this._type, type);
|
||||||
this._promise.then(data => resolver(data));
|
this._promise.then(data => resolver(data));
|
||||||
@ -317,7 +317,7 @@
|
|||||||
return promise;
|
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);
|
this._convert(this._type, type);
|
||||||
}
|
}
|
||||||
return this._promise;
|
return this._promise;
|
||||||
|
Loading…
Reference in New Issue
Block a user