From b2eba1072b3fbf5cdb3d9c7f50a6a5acfcaa2064 Mon Sep 17 00:00:00 2001 From: Amjad Masad Date: Thu, 26 Mar 2015 14:41:56 -0700 Subject: [PATCH] [react-packager] Fix node v0.11.14 query parse bug --- react-packager/src/Server/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/react-packager/src/Server/index.js b/react-packager/src/Server/index.js index ad417de1..40281c69 100644 --- a/react-packager/src/Server/index.js +++ b/react-packager/src/Server/index.js @@ -246,6 +246,9 @@ Server.prototype.processRequest = function(req, res, next) { function getOptionsFromUrl(reqUrl) { // `true` to parse the query param as an object. var urlObj = url.parse(reqUrl, true); + // node v0.11.14 bug see https://github.com/facebook/react-native/issues/218 + urlObj.query = urlObj.query || {}; + var pathname = urlObj.pathname; // Backwards compatibility. Options used to be as added as '.' to the