mirror of
https://github.com/discourse/discourse.git
synced 2025-05-26 05:34:56 +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 {
|
} else {
|
||||||
var protocol = window.location.protocol + '//',
|
var protocol = window.location.protocol + '//',
|
||||||
hostname = window.location.hostname,
|
hostname = window.location.hostname,
|
||||||
port = ':' + window.location.port;
|
port = window.location.port ? ':' + window.location.port : '';
|
||||||
return protocol + hostname + port + url;
|
return protocol + hostname + port + url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user