You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When URI is used without the new keyword it will return a new instance of itself passing both an url and base parameter.
if(!(thisinstanceofURI)){returnnewURI(url,base);}
Since these parameters are both undefined at this point, it is caught by the undefined check on the url and then also passes the check on the arguments length, throwing a TypeError.
if(url===undefined){if(arguments.length){thrownewTypeError('undefined is not a valid argument for URI');}
The text was updated successfully, but these errors were encountered:
When URI is used without the new keyword it will return a new instance of itself passing both an
url
andbase
parameter.Since these parameters are both undefined at this point, it is caught by the undefined check on the url and then also passes the check on the arguments length, throwing a
TypeError
.The text was updated successfully, but these errors were encountered: