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 authored Sep 17, 2024
1 parent 5b5f3d8 commit 499582a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/schema/uuid.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ function SchemaUUID(key, options) {
if (Buffer.isBuffer(value)) {
return binaryToString(value);
} else if (value instanceof Binary) {
if (value instanceof Binary) {
return binaryToString(value.buffer);
}
return binaryToString(value.buffer);
} else if (utils.isPOJO(value) && value.type === 'Buffer' && Array.isArray(value.data)) {
// Cloned buffers look like `{ type: 'Buffer', data: [5, 224, ...] }`
return binaryToString(Buffer.from(value.data));
Expand Down

0 comments on commit 499582a

Please sign in to comment.