Merge pull request #10404 from Snuffleupagus/issue-10401

Remove the `for ... of` loop from the `PDFDocument.fingerprint` getter (issue 10401)
This commit is contained in:
Tim van der Meij 2019-01-03 22:46:51 +01:00 committed by GitHub
commit 2d00bb098b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -600,8 +600,8 @@ class PDFDocument {
}
let fingerprint = '';
for (const hashPart of hash) {
const hex = hashPart.toString(16);
for (let i = 0, ii = hash.length; i < ii; i++) {
const hex = hash[i].toString(16);
fingerprint += (hex.length === 1 ? '0' + hex : hex);
}
return shadow(this, 'fingerprint', fingerprint);