diff --git a/common/src/app/common/uuid_impl.js b/common/src/app/common/uuid_impl.js index 5c184f808c..fd257f6ab9 100644 --- a/common/src/app/common/uuid_impl.js +++ b/common/src/app/common/uuid_impl.js @@ -24,8 +24,10 @@ goog.scope(function() { }; } else if (typeof require === "function") { const crypto = require("crypto"); + const randomBytes = crypto["randomBytes"]; + return (buf) => { - const bytes = crypto.randomBytes(buf.length); + const bytes = randomBytes(buf.length); buf.set(bytes) return buf; };