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
I would like to be able to set the window.location.href value to a value that uses any protocol and have it returned as expected. Currently I have a test like the following that fails:
I'm not a big picture kind of person, so I may not be thinking of the issues associated with the following change, but the url (and any url with a custom protocol) is parsed properly with the following regex:
I would like to be able to set the
window.location.href
value to a value that uses any protocol and have it returned as expected. Currently I have a test like the following that fails:The actual value is
//git://test
I believe the reason is because the url parser only understands http and https as protocols (given the regex in the URL.ts file):
So when the url is retrieved, '//' is prepended due to there being no protocol in this code:
I'm not a big picture kind of person, so I may not be thinking of the issues associated with the following change, but the url (and any url with a custom protocol) is parsed properly with the following regex:
An alternative solution may be only prepending the '//' when protocol is defined, but that may open up issues with protocol relative URLs.
The text was updated successfully, but these errors were encountered: