From d889abc79892438cf335a901353a666f45fbf04d Mon Sep 17 00:00:00 2001 From: Charly BITEAU Date: Sat, 7 Jan 2023 12:56:17 +0100 Subject: [PATCH] Make parseHash function working with negative values --- frontend/src/components/Map/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Map/index.tsx b/frontend/src/components/Map/index.tsx index 3c0b35d..149fb92 100644 --- a/frontend/src/components/Map/index.tsx +++ b/frontend/src/components/Map/index.tsx @@ -31,7 +31,7 @@ export const withBaseMapStyle = connect((state) => ({ function parseHash(v: string): Viewport | null { if (!v) return null; - const m = v.match(/^#([0-9\.]+)\/([0-9\.]+)\/([0-9\.]+)$/); + const m = v.match(/^#([0-9\.]+)\/([0-9\.\-]+)\/([0-9\.\-]+)$/); if (!m) return null; return { zoom: Number.parseFloat(m[1]),