From 02162ff62d13a23a2785532cabb5c3fbac2abb26 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Tue, 17 Sep 2024 11:18:58 -0400 Subject: [PATCH] Update lib/schema/uuid.js Co-authored-by: hasezoey --- lib/schema/uuid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/schema/uuid.js b/lib/schema/uuid.js index 37906e3c4f..1fbfc38654 100644 --- a/lib/schema/uuid.js +++ b/lib/schema/uuid.js @@ -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; }