-
-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Still getting Uncaught TypeError: t.trim is not a function in v3.10.1 #384
Comments
I had some time to look a bit deeper into this, and I must say I'm quite surprised #368 ever passed the review stage… // @ts-nocheck which frankly I would simply reject. Then the file also has this check: if (-90 < lat < 90 && -180 < lng < 180) { which is interesting (to put it mildly) but not a correct condition to check for valid coordinates (and if we take what it intended to accomplish, it also rejects 90, -90, 180 and -180 as invalid, which is wrong). I can provide a branch/PR that addresses my gripes (properly TypeScript'ed) if needed, but: I would propose to simply revert #368 and re-think what is required, @smeijer. |
Fair enough. Can you open a pull request that reverts both that pull and the later applied fix? |
The problem is not only with coordinate searches; it breaks all custom providers. Described the problem here: #368 |
PR that reverts this 'feature' is here: #385 |
Closed by #385 |
I've apologized for the PR that caused this. But the fact that |
#382 isn't completely solved (by #383) in v3.10.1; there is a difference between how
validateCoords()
is called while typing and after pressing Enter (or selecting a suggestion from the list). While typing, it is called with the string that was typed in, and after pressing Enter, it is called with an object{ query: this.searchElement.input.value, data: item }
(see https://github.com/smeijer/leaflet-geosearch/blob/develop/src/SearchControl.ts#L332-L336 ).The text was updated successfully, but these errors were encountered: