Skip to content

Commit 0880fa8

Browse files
stdavissteveoh
andauthored
fix: do less work
Co-authored-by: steveoh <[email protected]>
1 parent 6efc28f commit 0880fa8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/MapContainer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,12 @@ export const MapContainer = ({ onClick }: { onClick?: __esri.ViewImmediateClickE
7272
},
7373
};
7474

75-
let { index: basemapIndex } = randomize(selectorOptions.options.basemaps!);
75+
let basemapIndex: number;
7676
const basemapUrlParam = getUrlParameter<string>('basemap', 'string') as BasemapToken;
7777
if (basemapUrlParam) {
7878
basemapIndex = selectorOptions.options.basemaps!.indexOf(basemapUrlParam);
7979
} else {
80+
basemapIndex = randomize(selectorOptions.options.basemaps!).index;
8081
setUrlParameter<string>('basemap', selectorOptions.options.basemaps![basemapIndex]! as string);
8182
}
8283

0 commit comments

Comments
 (0)