balazsbotond / urlcat

A URL builder library for JavaScript.
https://urlcat.org
MIT License
1.82k stars 57 forks source link

Not compatible with Safari 10 #145

Closed comatory closed 1 year ago

comatory commented 3 years ago

Describe the bug The path is incorrectly concatenated with stringified object.

To Reproduce

  1. Use Safari 10
  2. Navigate to http://incandescent-farmer.surge.sh/
  3. Result is /hello/world?%5Bobject=Object%5D=

Expected behavior Result should be /hello/world only

Screenshots

Screenshot 2021-03-07 at 17 53 07

Desktop (please complete the following information):

comatory commented 3 years ago

Useful library that I've used in the past. I have built my own parsers like this before and did not want to do it again. My current project is Javascript SPA that supports ES6. So I was bummed seeing this in Safari 10 which is perfectly capable of running my code. However basically the app is unusable since I'm using urlcat to construct URLs for my application router and data fetching, so basically everything fails because this string is being injected as query parameter everywhere (at least it looks like it).

Anricx commented 3 years ago

any update?

alfianandinugraha commented 2 years ago

Can this issue fix by Babel?

balazsbotond commented 1 year ago

I've just merged the PR, sorry for the huge delay everyone.