Skip to content

Commit

Permalink
Backport PR jupyterhub#83: query string is an object, but also not an…
Browse files Browse the repository at this point in the history
… object, on node6

hasOwnProperty is not defined, even though `typeof q` is object.

This should get tests passing on node 6
  • Loading branch information
rgbkrk authored and minrk committed Oct 12, 2016
1 parent 3b022c9 commit 680bd02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/configproxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ ConfigurableProxy.prototype.get_routes = function (req, res) {
var inactive_since = null;
if (parsed.query) {
var query = querystring.parse(parsed.query);
if (query.hasOwnProperty('inactive_since')) {

if (query.inactive_since !== undefined) {
var timestamp = Date.parse(query.inactive_since);
if (isFinite(timestamp)) {
inactive_since = new Date(timestamp);
Expand Down

0 comments on commit 680bd02

Please sign in to comment.