Skip to content

Commit 0578edb

Browse files
committed
update url regex match
1 parent 605a197 commit 0578edb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/essence/Basics/Layers_/Layers_.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3616,11 +3616,13 @@ function parseConfig(configData, urlOnLayers) {
36163616
expandLayers(layers, 0, null)
36173617

36183618
function expandLayers(d, level, prevName) {
3619+
const stacRegex = /^stac(-((item)|(catalog)|(collection)))?:/i
3620+
36193621
//Iterate over each layer
36203622
for (let i = 0; i < d.length; i++) {
36213623
// check if this is a STAC catalog or collection
36223624
// if so, prefetch the data and replace this entry
3623-
if (d[i].url.startsWith('stac:')) {
3625+
if (stacRegex.test(d[i].url)) {
36243626
d[i] = getSTACLayers(d[i])
36253627
}
36263628

0 commit comments

Comments
 (0)