From 271de0f9b64576fa8747fc7adc17ac435561248b Mon Sep 17 00:00:00 2001 From: Martin Bigio Date: Fri, 23 Oct 2015 13:56:10 -0700 Subject: [PATCH] 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 --- packager/webSocketProxy.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packager/webSocketProxy.js b/packager/webSocketProxy.js index 65c354640..f5ff7ea01 100644 --- a/packager/webSocketProxy.js +++ b/packager/webSocketProxy.js @@ -59,11 +59,12 @@ function attachToServer(server, path) { return { server: wss, - isChromeConnected: () => - clients - .map(ws => ws.upgradeReq.headers['user-agent']) + isChromeConnected: function() { + return clients + .map(function(ws) { return ws.upgradeReq.headers['user-agent']; }) .filter(Boolean) - .some(userAgent => userAgent.includes('Chrome')) + .some(function(userAgent) { return userAgent.includes('Chrome'); }) + } }; }