mirror of
https://github.com/penpot/penpot.git
synced 2026-02-13 23:23:10 +00:00
📎 Fix nodejs compatibility issue on uuid_impl
This commit is contained in:
committed by
alonso.torres
parent
12cc5c6c97
commit
197eff93e8
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user