fix: default zoom level when location is not set (#21428)

This commit is contained in:
Brandon Wees 2025-08-30 13:33:11 -05:00 committed by GitHub
parent 303307e1ac
commit b3372064e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,7 +44,7 @@
let mapLat = $derived(assetLat ?? previousLocation?.lat ?? undefined); let mapLat = $derived(assetLat ?? previousLocation?.lat ?? undefined);
let mapLng = $derived(assetLng ?? previousLocation?.lng ?? undefined); let mapLng = $derived(assetLng ?? previousLocation?.lng ?? undefined);
let zoom = $derived(mapLat !== undefined && mapLng !== undefined ? 12.5 : 1); let zoom = $derived(mapLat && mapLng ? 12.5 : 1);
$effect(() => { $effect(() => {
if (mapElement && initialPoint) { if (mapElement && initialPoint) {