mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 07:16:39 +00:00
Fix Leaflet import (#5802)
This commit is contained in:
parent
966c0bc06c
commit
05ac275780
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user