diff --git a/uuid.js b/uuid.js index 6598c9b3..4198ca84 100644 --- a/uuid.js +++ b/uuid.js @@ -18,7 +18,7 @@ // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html // // Moderately fast, high quality - if ('function' === typeof require) { + if ('undefined' === typeof window && 'function' === typeof require) { try { var _rb = require('crypto').randomBytes; _nodeRNG = _rng = _rb && function() {return _rb(16);};