Unleash / unleash-proxy-client-js

A browser client that can be used together with the unleash-proxy.
Apache License 2.0
44 stars 46 forks source link

Right-hand side of instanceof is not an object #123

Closed VaynePeng closed 1 year ago

VaynePeng commented 1 year ago

Describe the bug

image An error is reported when the url is passed in a string Maybe you need Object.prototype.toString.call(url) === '[object URL]' ? url : new URL(url)

Steps to reproduce the bug

No response

Expected behavior

No response

Logs, error output, etc.

No response

Screenshots

No response

Additional context

No response

Unleash version

No response

Subscription type

No response

Hosting type

No response

SDK information (language and version)

No response

sighphyre commented 1 year ago

Hey @VaynePeng, I'm not able to reproduce this and we have a few test cases that already cover passing in a string as a URL. Can you provide some details on what the error is that you're seeing, what version of this library you're using and a minimal reproducible example? Thanks!