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.
Этот коммит содержится в:
коммит произвёл
enahum
родитель
9bdea0de80
Коммит
68a05653ea
@@ -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:')) {
|
||||
|
||||
Ссылка в новой задаче
Block a user