unshiftio / requires-port

Check if a protocol requires a certain port number to be added to an URL.
MIT License
11 stars 5 forks source link

Fix error in split function #17

Closed gabrielfreirebraz closed 1 year ago

gabrielfreirebraz commented 1 year ago

if protocol params dont be string type it provide a syntax error

lpinca commented 1 year ago

The crash is expected if the function is called with a protocol argument that is not a string.

lpinca commented 1 year ago

Thank you anyway.

gabrielfreirebraz commented 1 year ago

Yes, I figured it, but with this manner is easier for to find the error. When crash happened the error was invisible for me in the first time and after this fix the error show us clearly in console.

I appreciate your consideration! Tks