fix(share): reject inherited style keys during restore

This commit is contained in:
Said committed 2026-10-20 00:38:09 +01:00
1 parent de2138e84c
commit d49877ad2e
6 files changed
+50 -2

No files matched your search

+3 -1
View File
@@ -370,7 +370,9 @@ export function viewFromParams(params) {
pitch_deg: number('pitch'),
},
layers: state?.enabledLayerIds ?? [],
style: STYLES_BY_URL_NAME[params.get('style')] ?? null,
style: Object.hasOwn(STYLES_BY_URL_NAME, params.get('style'))
? STYLES_BY_URL_NAME[params.get('style')]
: null,
map: VIEW_MAPS.includes(map) ? map : null,
follow,
annotations: annotationsFromParams(params),