fix: usar shallowRef para caminandoPolyline (setMap null fallaba silenciosamente con ref)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { ref } from 'vue';
|
||||
import { ref, shallowRef } from 'vue';
|
||||
import type { BusStop } from '@/types';
|
||||
import { useMapState } from './useMapState';
|
||||
|
||||
@ -22,7 +22,7 @@ function getHaversineDistance(lat1: number, lon1: number, lat2: number, lon2: nu
|
||||
const paradaCercana = ref<BusStop | null>(null);
|
||||
const distanciaMetros = ref<number>(0);
|
||||
const duracionCaminata = ref<number>(0);
|
||||
const caminandoPolyline = ref<google.maps.Polyline | null>(null);
|
||||
const caminandoPolyline = shallowRef<google.maps.Polyline | null>(null);
|
||||
|
||||
export function useParadaCercana() {
|
||||
const { registrarPolyline } = useMapState();
|
||||
|
||||
Reference in New Issue
Block a user