Closed mugu-fatman closed 8 months ago
what was this closed? im also facing the same issue @mugu-fatman
Same here:
Downgrading to the previous version makes the error disappear. Please reopen or provide a reason why this was closed.
Note that the reason for the exception appears to be that validateCoords(query)
is called with an undefined
query, so this change would fix it:
diff --git a/src/coords.ts b/src/coords.ts
index b874b8e..e413608 100644
--- a/src/coords.ts
+++ b/src/coords.ts
@@ -1,7 +1,7 @@
// @ts-nocheck
export function validateCoords(query) {
- const q = query.trim();
+ const q = query?.trim();
const regex = /^(-?[0-9]*\.?\s*[0-9]*)\s*,?\s*(-?[0-9]*\.?[0-9]*)$/g;
const match = regex.exec(q);
if (match) {
mugu-fatman closed it himself. It wasn't the library maintainer.
I've opened a new issue #382 and PR #383
Thank you, There was already another issue opened for the same reason
Hi , Thanks for the wonderful library , I am trying to use leaflet-geosearch in my svelte-kit application. but getting an this type error
I am using the searchControl as below
using typescript version
"typescript": "^5.0.0",