summaryrefslogtreecommitdiffstats
path: root/webapp/actions
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2017-02-08 00:20:01 +0900
committerenahum <nahumhbl@gmail.com>2017-02-07 07:20:01 -0800
commit68a05653ea6f2588a27c8ce523b0d213e48f6480 (patch)
tree4b99b1f3424ae83a4908386d53caa7dd09f8bf54 /webapp/actions
parent9bdea0de80a21b214eb9041057ab8e3fea681a8b (diff)
downloadchat-68a05653ea6f2588a27c8ce523b0d213e48f6480.tar.gz
chat-68a05653ea6f2588a27c8ce523b0d213e48f6480.tar.bz2
chat-68a05653ea6f2588a27c8ce523b0d213e48f6480.zip
Add webapp/utils/url.jsx (#5285)
webapp/utils/utils.jsx got big and that caused a potential circular dependency with webapp/stores/team_store.jsx. This change solves the issue by introducing webapp/utils/url.jsx and moving URL-related functions, which is not likely to depend on actions and stores, from webapp/utils/utils.jsx.
Diffstat (limited to 'webapp/actions')
-rw-r--r--webapp/actions/websocket_actions.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx
index 1a0ddda63..3f3e81d16 100644
--- a/webapp/actions/websocket_actions.jsx
+++ b/webapp/actions/websocket_actions.jsx
@@ -17,6 +17,7 @@ import WebSocketClient from 'client/web_websocket_client.jsx';
import * as WebrtcActions from './webrtc_actions.jsx';
import * as Utils from 'utils/utils.jsx';
import * as AsyncClient from 'utils/async_client.jsx';
+import {getSiteURL} from 'utils/url.jsx';
import * as GlobalActions from 'actions/global_actions.jsx';
import {handleNewPost, loadPosts, loadProfilesForPosts} from 'actions/post_actions.jsx';
@@ -36,7 +37,7 @@ export function initialize() {
return;
}
- let connUrl = Utils.getSiteURL();
+ let connUrl = getSiteURL();
// replace the protocol with a websocket one
if (connUrl.startsWith('https:')) {