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
Next Next commit
Update lib/schema/uuid.js
Co-authored-by: hasezoey <[email protected]>
  • Loading branch information
vkarpov15 and hasezoey authored Sep 17, 2024
commit 499582a46e8680a9af084e16c5062e786282d6f9
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