summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-11-10 09:22:06 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-11-10 09:22:06 -0500
commit8c76560b4849f8d1fdc3c3f1c2f1877459a30fca (patch)
treed373ee86ac86f6613f24f2c82ca09aa6144f5c33 /webapp/utils
parent39675afab4ba6e22b834aa6ff8d7dab2a35c5a8d (diff)
downloadchat-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.jsx10
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) {