mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
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:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user