Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update lib/bson/objectid.js

  • Loading branch information...
commit 7513db5bda96990c828ad5bdeac2df8da5604489 1 parent 1211119
@dwerner dwerner authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/bson/objectid.js
View
2  lib/bson/objectid.js
@@ -221,7 +221,7 @@ ObjectID.createFromTime = function createFromHexString(time) {
*/
ObjectID.createFromHexString = function createFromHexString (hexString) {
// Throw an error if it's not a valid setup
- if(hexString != null && hexString.length != 24) throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters in hex format");
+ if(typeof hexString === 'undefined' || hexString != null && hexString.length != 24) throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters in hex format");
var len = hexString.length;

0 comments on commit 7513db5

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