Skip to content

Commit

Permalink
fix: make parseUrl helper always have a protocl (#4673)
Browse files Browse the repository at this point in the history
Fixes #3100.
  • Loading branch information
mmodrow authored and gkatsev committed Oct 31, 2017
1 parent e2af322 commit bebca9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/utils/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ export const parseUrl = function(url) {
details.host = details.host.replace(/:443$/, '');
}

if (!details.protocol) {
details.protocol = window.location.protocol;
}

if (addToBody) {
document.body.removeChild(div);
}
Expand Down

0 comments on commit bebca9c

Please sign in to comment.