mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 02:06:14 +08:00
Merge pull request #1 from toumou/FIX-uploadLocation-when-window.location.port-is-empty
FIX uploadLocation when window.location.port is empty
This commit is contained in:
commit
c39121eae0
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user