From 09da14fed489b06295ea5a2248c4ae26c39cb150 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 15 Mar 2023 19:13:07 +0800 Subject: [PATCH] fix(nc-gui): geo onSuccess and onError type & fix type 'number' is not assignable to type 'string' --- packages/nc-gui/components/cell/GeoData.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui/components/cell/GeoData.vue b/packages/nc-gui/components/cell/GeoData.vue index 0ab6575361..27446a0e1d 100644 --- a/packages/nc-gui/components/cell/GeoData.vue +++ b/packages/nc-gui/components/cell/GeoData.vue @@ -49,14 +49,14 @@ const clear = () => { const onClickSetCurrentLocation = () => { isLoading = true - const onSuccess = (position) => { + const onSuccess = (position: GeolocationPosition) => { const crd = position.coords - formState.latitude = crd.latitude - formState.longitude = crd.longitude + formState.latitude = `${crd.latitude}` + formState.longitude = `${crd.longitude}` isLoading = false } - const onError = (err) => { + const onError = (err: GeolocationPositionError) => { console.error(`ERROR(${err.code}): ${err.message}`) isLoading = false }