Skip to content
This repository
Browse code

misc

  • Loading branch information...
commit 0eb5401a242798faa131588d592106ddfd7e66a9 1 parent 94c0f36
TJ Holowaychuk authored May 16, 2011

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/querystring.js
2  lib/querystring.js
@@ -76,7 +76,7 @@ exports.parse = function(str) {
76 76
             // if there are more parts, we need to continue parsing
77 77
             if (parts.length) {
78 78
               // if obj is an empty array, push a new object into in
79  
-              if (!obj.length || typeof(obj[obj.length - 1]) != 'object') obj.push({});
  79
+              if (!obj.length || 'object' != typeof(obj[obj.length - 1])) obj.push({});
80 80
 
81 81
               // the new obj is the last one in this array
82 82
               parse(obj[obj.length - 1], parts, obj, part);

2 notes on commit 0eb5401

eleith
eleith commented on 0eb5401 May 16, 2011

is this an aesthetic preference or motivated by something else?

TJ Holowaychuk
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.