Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed May 16, 2011
1 parent 94c0f36 commit 0eb5401
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/querystring.js
Expand Up @@ -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);
Expand Down

2 comments on commit 0eb5401

@eleith
Copy link

@eleith eleith commented on 0eb5401 May 16, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this an aesthetic preference or motivated by something else?

@tj
Copy link
Owner Author

@tj tj commented on 0eb5401 May 16, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.