Use includes instead of indexOf

This commit is contained in:
Maximilian Krög
2022-08-05 00:36:16 +02:00
parent 5e34b9aa20
commit 0b945f2321
26 changed files with 50 additions and 57 deletions

View File

@@ -195,11 +195,7 @@ class Zoomify extends TileImage {
});
let url = options.url;
if (
url &&
url.indexOf('{TileGroup}') == -1 &&
url.indexOf('{tileIndex}') == -1
) {
if (url && !url.includes('{TileGroup}') && !url.includes('{tileIndex}')) {
url += '{TileGroup}/{z}-{x}-{y}.jpg';
}
const urls = expandUrl(url);