Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update lib/schema/uuid.js
Co-authored-by: hasezoey <[email protected]>
  • Loading branch information
vkarpov15 and hasezoey authored Sep 17, 2024
commit 02162ff62d13a23a2785532cabb5c3fbac2abb26
2 changes: 1 addition & 1 deletion lib/schema/uuid.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function binaryToString(uuidBin) {
// i(hasezoey) dont quite know why, but "uuidBin" may sometimes also be the already processed string
let hex;
if (typeof uuidBin !== 'string' && uuidBin != null) {
hex = uuidBin != null && uuidBin.toString('hex');
hex = uuidBin.toString('hex');
const uuidStr = hex.substring(0, 8) + '-' + hex.substring(8, 8 + 4) + '-' + hex.substring(12, 12 + 4) + '-' + hex.substring(16, 16 + 4) + '-' + hex.substring(20, 20 + 12);
return uuidStr;
}
Expand Down