Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

misc

  • Loading branch information...
commit 0eb5401a242798faa131588d592106ddfd7e66a9 1 parent 94c0f36
@tj authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/querystring.js
View
2  lib/querystring.js
@@ -76,7 +76,7 @@ exports.parse = function(str) {
// if there are more parts, we need to continue parsing
if (parts.length) {
// if obj is an empty array, push a new object into in
- if (!obj.length || typeof(obj[obj.length - 1]) != 'object') obj.push({});
+ if (!obj.length || 'object' != typeof(obj[obj.length - 1])) obj.push({});
// the new obj is the last one in this array
parse(obj[obj.length - 1], parts, obj, part);

2 comments on commit 0eb5401

@eleith

is this an aesthetic preference or motivated by something else?

@tj
Owner

just a personal preference thing, doesn't apply to this case but typically foo == 'bar' I write 'foo' == bar to prevent foo = 'bar' by accident

Please sign in to comment.
Something went wrong with that request. Please try again.