[react-packager] Fix node v0.11.14 query parse bug

This commit is contained in:
Amjad Masad 2015-03-26 14:41:56 -07:00
parent 113d7eeafe
commit b2eba1072b
1 changed files with 3 additions and 0 deletions

View File

@ -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