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:
parent
12cc5c6c97
commit
197eff93e8
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue