diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-11-10 09:22:06 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-11-10 09:22:06 -0500 |
commit | 8c76560b4849f8d1fdc3c3f1c2f1877459a30fca (patch) | |
tree | d373ee86ac86f6613f24f2c82ca09aa6144f5c33 /webapp/utils | |
parent | 39675afab4ba6e22b834aa6ff8d7dab2a35c5a8d (diff) | |
download | chat-8c76560b4849f8d1fdc3c3f1c2f1877459a30fca.tar.gz chat-8c76560b4849f8d1fdc3c3f1c2f1877459a30fca.tar.bz2 chat-8c76560b4849f8d1fdc3c3f1c2f1877459a30fca.zip |
Fix websocket on old versions of IE11 (#4501)
Diffstat (limited to 'webapp/utils')
-rw-r--r-- | webapp/utils/utils.jsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx index 5d456bf83..d2ea25f22 100644 --- a/webapp/utils/utils.jsx +++ b/webapp/utils/utils.jsx @@ -1270,7 +1270,15 @@ export function isValidPassword(password) { } export function getSiteURL() { - return global.mm_config.SiteURL || window.location.origin; + if (global.mm_config.SiteURL) { + return global.mm_config.SiteURL; + } + + if (window.location.origin) { + return window.location.origin; + } + + return window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : ''); } export function handleFormattedTextClick(e) { |