Skip to content

Commit

Permalink
Update lib/schema/uuid.js
Browse files Browse the repository at this point in the history
Co-authored-by: hasezoey <hasezoey@gmail.com>
  • Loading branch information
vkarpov15 and hasezoey committed Sep 17, 2024
1 parent 499582a commit 02162ff
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 02162ff

Please sign in to comment.