Simplify expression

This commit is contained in:
Franck Royer 2021-07-15 12:16:03 +10:00
parent 13c8a0527b
commit 75d1b3834c
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 3 additions and 8 deletions

View File

@ -222,14 +222,9 @@ function validateDataIntegrity(
return false;
}
if (
expectedSize > 3 &&
Buffer.from(value).equals(Buffer.alloc(value.length))
) {
return false;
}
return true;
return !(
expectedSize > 3 && Buffer.from(value).equals(Buffer.alloc(value.length))
);
}
function getSignature(message: Buffer): Buffer {