mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 12:34:17 +00:00
Fix webSocketProxy.js
Summary: cc mkonicek ide Closes https://github.com/facebook/react-native/pull/3638 Reviewed By: svcscm Differential Revision: D2576536 Pulled By: martinbigio fb-gh-sync-id: 27f53eedf2bd94f71f4e405d3d4bb193eaabc918
This commit is contained in:
parent
ba6be7ab88
commit
271de0f9b6
@ -59,11 +59,12 @@ function attachToServer(server, path) {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
server: wss,
|
server: wss,
|
||||||
isChromeConnected: () =>
|
isChromeConnected: function() {
|
||||||
clients
|
return clients
|
||||||
.map(ws => ws.upgradeReq.headers['user-agent'])
|
.map(function(ws) { return ws.upgradeReq.headers['user-agent']; })
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.some(userAgent => userAgent.includes('Chrome'))
|
.some(function(userAgent) { return userAgent.includes('Chrome'); })
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user