From 8a6c03f969b3332846159312dc583d1746609eea Mon Sep 17 00:00:00 2001 From: Robert Kieffer Date: Mon, 2 Jan 2012 15:52:06 -0800 Subject: [PATCH] Fix #30, _rb not defined for lesser node.js versions --- package.json | 2 +- uuid.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d431016c..acef89e3 100644 --- a/package.json +++ b/package.json @@ -10,5 +10,5 @@ "dependencies" : [], "lib" : ".", "main" : "./uuid.js", - "version" : "1.3.2" + "version" : "1.3.3" } diff --git a/uuid.js b/uuid.js index 565d33f3..27f1d127 100644 --- a/uuid.js +++ b/uuid.js @@ -43,7 +43,7 @@ // Node.js only, moderately fast, high quality try { var _rb = require('crypto').randomBytes; - nodeRNG = function() { + nodeRNG = _rb && function() { return _rb(16); }; } catch (e) {}