Skip to content

Commit

Permalink
videojs#3100 fix: moved protocol fix to other protocol related condit…
Browse files Browse the repository at this point in the history
…ionals and expanded from (details.protocol === '') to (!details.protocol)

Both implement suggestions from @misteroneill .
  • Loading branch information
mmodrow committed Oct 25, 2017
1 parent 1d99a2d commit e38a857
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/js/utils/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ export const parseUrl = function(url) {
details.host = details.host.replace(/:443$/, '');
}

if (addToBody) {
document.body.removeChild(div);
if (!details.protocol) {
details.protocol = window.location.protocol;
}

if (details.protocol === '') {
details.protocol = window.location.protocol;
if (addToBody) {
document.body.removeChild(div);
}

return details;
Expand Down

0 comments on commit e38a857

Please sign in to comment.