mirror of
https://github.com/jlengrand/leaflet-geosearch.git
synced 2026-03-10 08:31:26 +00:00
fix incorrect window check
This commit is contained in:
@@ -7,11 +7,13 @@ const viewport: Viewport = {
|
||||
};
|
||||
|
||||
export interface LeafletConfig {
|
||||
viewport: Viewport;
|
||||
viewport?: Viewport;
|
||||
}
|
||||
|
||||
const useConfigureLeaflet = (): LeafletConfig => {
|
||||
if (!window) return;
|
||||
if (typeof window === 'undefined') {
|
||||
return {};
|
||||
}
|
||||
|
||||
// To get around an issue with the default icon not being set up right between using React
|
||||
// and importing the leaflet library, we need to reset the image imports
|
||||
|
||||
Reference in New Issue
Block a user