Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #9 from namuol/master

Pass Mongoose `ObjectID` values into `encryptHex`
  • Loading branch information...
commit 1f0cd5b30afd1e97cb33cb852b6e4e8d3fd25eda 2 parents 59c8f5d + 80604a9
@ivanakimov authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/hashids.js
View
2  lib/hashids.js
@@ -152,7 +152,7 @@ Hashids.prototype.encryptHex = function(str) {
return "";
}
- numbers = str.match(/[\w\W]{1,12}/g);
+ numbers = str.toString().match(/[\w\W]{1,12}/g);
for (i = 0, len = numbers.length; i !== len; i++) {
numbers[i] = parseInt("1" + numbers[i], 16);
Please sign in to comment.
Something went wrong with that request. Please try again.