Skip to content

Commit

Permalink
PB-1211 : do not add ; if layer with feature selection is alone
Browse files Browse the repository at this point in the history
When opening the app with a layerId=featureId URL param, the ; was still added to the layers URL param after processing the feature pre-selection. This means the layers URL param was malformed and an error showed up.
  • Loading branch information
pakb committed Nov 26, 2024
1 parent 9a9c1f6 commit 4e091ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/legacyLayerParamUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,10 @@ export function handleLegacyFeaturePreSelectionParam(params, store, newQuery) {
// if there are no layers parameters at all, we need to create one
newQuery.layers = ''
}
newQuery.layers += `;${layerId}@features=${featuresIds.split(',').join(':')}`
if (newQuery.layers.length > 0) {
newQuery.layers += ';'
}
newQuery.layers += `${layerId}@features=${featuresIds.split(',').join(':')}`
}
})
}
Expand Down

0 comments on commit 4e091ae

Please sign in to comment.