0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 10:38:13 -05:00

📎 Fix nodejs compatibility issue on uuid_impl

This commit is contained in:
Andrey Antukh 2022-11-14 09:59:26 +01:00 committed by alonso.torres
parent 12cc5c6c97
commit 197eff93e8

View file

@ -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;
};