Skip to content

Commit

Permalink
Merge pull request #175 from yulinscottkang/unit
Browse files Browse the repository at this point in the history
fix: unit test failures
  • Loading branch information
yulinscottkang committed Oct 6, 2023
2 parents 62f09ae + 43be10c commit 5ba66a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/AzureMap/AzureMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ const AzureMap = memo(

useEffect(() => {
if (mapRefSource.current === null) {
if (!options.sessionId) {
mapRefSource.current = new atlas.Map(mapId, {
...(options || {}),
// Assign default session ID with a prefix
atlas.setSessionId(`react-azure-maps:${Guid.create().toString()}`)
}
mapRefSource.current = new atlas.Map(mapId, options)
sessionId: options?.sessionId || `react-azure-maps:${Guid.create().toString()}`
})
}
setMapRef(mapRefSource.current)
return () => {
Expand Down

0 comments on commit 5ba66a6

Please sign in to comment.