Skip to content
This repository
Browse code

Minor optimization for Hash

  • Loading branch information...
commit 5e835264493e06e022ceca028ca5ee8f477d6f83 1 parent be9dc54
Tim Caswell authored August 19, 2010

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

  1. 2  lib/hash.js
2  lib/hash.js
@@ -3,7 +3,7 @@
3 3
 var Hash = module.exports = Object.create(Object.prototype, {
4 4
   // Make for easy converting objects to hashes.
5 5
   new: {value: function (value) {
6  
-    value = value || {};
  6
+    if (value === undefined) return Object.create(Hash);
7 7
     value.__proto__ = Hash;
8 8
     return value;
9 9
   }},

0 notes on commit 5e83526

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