Skip to content

Commit

Permalink
Merge pull request #1151 from geoadmin/fix-PB-1259-change-bglayer-thr…
Browse files Browse the repository at this point in the history
…ough-url

PB-1259: allow bgLayer modification through URL
  • Loading branch information
pakb authored Dec 2, 2024
2 parents a9eb9a0 + 22eacd8 commit 92164e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/router/storeSync/storeSync.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const storeSyncConfig = [
query,
// in cypress, the backgroundLayers is undefined, so we skip this check
IS_TESTING_WITH_CYPRESS ||
query === 'void' ||
store.getters.backgroundLayers?.map((layer) => layer.id).includes(query),
'bgLayer'
),
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/layers.store.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ const actions = {
* @param {string} dispatcher Action dispatcher name
*/
setBackground({ commit, getters }, { bgLayerId }) {
if (bgLayerId === null) {
if (bgLayerId === null || bgLayerId === 'void') {
// setting it to no background
commit('setBackground', { bgLayerId: null })
}
Expand Down

0 comments on commit 92164e4

Please sign in to comment.