From c16662e6e70ef3e05fbf893956def6f0a4d759ce Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Sat, 11 May 2024 23:55:23 +0200 Subject: [PATCH] Fix opening windy.com/plugin/sdg --- src/pluginConfig.ts | 2 +- src/sounding.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pluginConfig.ts b/src/pluginConfig.ts index f910957..636da07 100644 --- a/src/pluginConfig.ts +++ b/src/pluginConfig.ts @@ -5,7 +5,7 @@ import type { ExternalPluginConfig } from '@windy/interfaces'; const config: ExternalPluginConfig = { author: "Victor Berchet", name: "windy-plugin-sounding", - version: "3.0.7", + version: "3.0.8", description: "Soundings for paraglider pilots", repository: "git+https://github.com/vicb/windy-plugin-sounding", title: 'Better Soundings', diff --git a/src/sounding.tsx b/src/sounding.tsx index eff2fa7..7e44c46 100644 --- a/src/sounding.tsx +++ b/src/sounding.tsx @@ -71,7 +71,7 @@ export const openPlugin = (ll?: LatLon) => { let lat: number; let lon: number; - if (!ll) { + if (!ll || ll.lat == null || ll.lon == null) { const c = windyMap.getCenter(); lat = c.lat; lon = c.lng;