mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-13 17:26:34 +08:00
[react-packager] Fix node v0.11.14 query parse bug
This commit is contained in:
3
packager/react-packager/src/Server/index.js
vendored
3
packager/react-packager/src/Server/index.js
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user