Skip to content

Commit b918929

Browse files
committed
Remove url module
1 parent 7a49ca7 commit b918929

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ParseLiveQuery.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import events from 'events';
2-
import url from 'url';
32
import LiveQueryClient from './LiveQueryClient';
43
import CoreManager from './CoreManager';
54

@@ -100,7 +99,7 @@ let DefaultLiveQueryController = {
10099

101100
// If we can not find Parse.liveQueryServerURL, we try to extract it from Parse.serverURL
102101
if (!liveQueryServerURL) {
103-
let host = url.parse(CoreManager.get('SERVER_URL')).host;
102+
let host = CoreManager.get('SERVER_URL').replace(/^https?:\/\//, '');
104103
liveQueryServerURL = 'ws://' + host;
105104
CoreManager.set('LIVEQUERY_SERVER_URL', liveQueryServerURL);
106105
}

0 commit comments

Comments
 (0)