Skip to content

Commit

Permalink
fix: add basemaps length check in loaded getter
Browse files Browse the repository at this point in the history
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
  • Loading branch information
vinayakkulkarni committed Mar 20, 2023
1 parent 8a5880f commit a8b4ca9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion composables/useMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ export const useMap = defineStore({
return basemap?.style;
},
loaded: (state): boolean => {
return state.ui.loaded || state.ui.styleChanged || state.ui.tilesLoaded;
return (
state.utils.basemaps.data.basemaps.length > 0 &&
(state.ui.loaded || state.ui.styleChanged || state.ui.tilesLoaded)
);
},
},
actions: {
Expand Down

0 comments on commit a8b4ca9

Please sign in to comment.