From 05ac2757808db6437916db205f17ce599095b2f4 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 7 May 2020 13:04:29 -0700 Subject: [PATCH] Fix Leaflet import (#5802) --- src/common/dom/setup-leaflet-map.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/dom/setup-leaflet-map.ts b/src/common/dom/setup-leaflet-map.ts index 9d95f5aee2..d943fb793b 100644 --- a/src/common/dom/setup-leaflet-map.ts +++ b/src/common/dom/setup-leaflet-map.ts @@ -1,4 +1,4 @@ -import { Map } from "leaflet"; +import type { Map } from "leaflet"; // Sets up a Leaflet map on the provided DOM element export type LeafletModuleType = typeof import("leaflet"); @@ -13,9 +13,9 @@ export const setupLeafletMap = async ( throw new Error("Cannot setup Leaflet map on disconnected element"); } // eslint-disable-next-line - const Leaflet = (await import( + const Leaflet = ((await import( /* webpackChunkName: "leaflet" */ "leaflet" - )) as LeafletModuleType; + )) as any).default as LeafletModuleType; Leaflet.Icon.Default.imagePath = "/static/images/leaflet/images/"; if (draw) {