From 97a52188af36675727377119d0c867844875e59f Mon Sep 17 00:00:00 2001 From: harlan Date: Sun, 15 Sep 2024 18:44:44 +1000 Subject: [PATCH] chore: broken type checking Fixes #260 --- src/runtime/components/ScriptGoogleMaps.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/runtime/components/ScriptGoogleMaps.vue b/src/runtime/components/ScriptGoogleMaps.vue index b84a1059..3a073c5f 100644 --- a/src/runtime/components/ScriptGoogleMaps.vue +++ b/src/runtime/components/ScriptGoogleMaps.vue @@ -147,7 +147,9 @@ function resetMapMarkerMap(_marker: google.maps.marker.AdvancedMarkerElement | P }) } -async function createAdvancedMapMarker(_options: google.maps.marker.AdvancedMarkerElementOptions | `${string},${string}`) { +async function createAdvancedMapMarker(_options?: google.maps.marker.AdvancedMarkerElementOptions | `${string},${string}`) { + if (!_options) + return const key = hash(_options) if (mapMarkers.value.has(key)) return mapMarkers.value.get(key) @@ -285,7 +287,6 @@ onMounted(() => { } } for (const k of toAdd) { - // @ts-expect-error broken createAdvancedMapMarker(nextMap.get(k)) } }, {