FIX uploadLocation when window.location.port is empty

More information available: https://meta.discourse.org/t/uploaded-video-are-not-embedded-and-display-a-link/53346
This commit is contained in:
Thomas Ferracin 2016-11-24 18:01:08 +01:00 committed by GitHub
parent 054c428ba3
commit c74a5771fd
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ export function uploadLocation(url) {
} else {
var protocol = window.location.protocol + '//',
hostname = window.location.hostname,
port = ':' + window.location.port;
port = window.location.port ? ':' + window.location.port : '';
return protocol + hostname + port + url;
}
}