We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6efc28f commit 0880fa8Copy full SHA for 0880fa8
src/components/MapContainer.tsx
@@ -72,11 +72,12 @@ export const MapContainer = ({ onClick }: { onClick?: __esri.ViewImmediateClickE
72
},
73
};
74
75
- let { index: basemapIndex } = randomize(selectorOptions.options.basemaps!);
+ let basemapIndex: number;
76
const basemapUrlParam = getUrlParameter<string>('basemap', 'string') as BasemapToken;
77
if (basemapUrlParam) {
78
basemapIndex = selectorOptions.options.basemaps!.indexOf(basemapUrlParam);
79
} else {
80
+ basemapIndex = randomize(selectorOptions.options.basemaps!).index;
81
setUrlParameter<string>('basemap', selectorOptions.options.basemaps![basemapIndex]! as string);
82
}
83
0 commit comments