mirror of
https://github.com/penpot/penpot.git
synced 2025-02-18 13:04:38 -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") {
|
} else if (typeof require === "function") {
|
||||||
const crypto = require("crypto");
|
const crypto = require("crypto");
|
||||||
|
const randomBytes = crypto["randomBytes"];
|
||||||
|
|
||||||
return (buf) => {
|
return (buf) => {
|
||||||
const bytes = crypto.randomBytes(buf.length);
|
const bytes = randomBytes(buf.length);
|
||||||
buf.set(bytes)
|
buf.set(bytes)
|
||||||
return buf;
|
return buf;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue