diff --git a/objectid.js b/objectid.js index 15c6bab..4307a2d 100644 --- a/objectid.js +++ b/objectid.js @@ -1,5 +1,5 @@ -var MACHINE_ID = parseInt(Math.random() * 0xFFFFFF, 10); +var MACHINE_ID = Math.floor(Math.random() * 0xFFFFFF); var index = ObjectID.index = parseInt(Math.random() * 0xFFFFFF, 10); var pid = (typeof process === 'undefined' || typeof process.pid !== 'number' ? Math.floor(Math.random() * 100000) : process.pid) % 0xFFFF;