From 8c278530dd04a2e1020d242627de426bbe81ceb3 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 3 Jan 2019 11:14:11 +0100 Subject: [PATCH] Remove the `for ... of` loop from the `PDFDocument.fingerprint` getter (issue 10401) It appears that the `Symbol` polyfill doesn't work well in conjunction with `TypedArray`s, and that part of PR 10393 is thus reverted. --- src/core/document.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/document.js b/src/core/document.js index 8d60d1a7e..115c8011c 100644 --- a/src/core/document.js +++ b/src/core/document.js @@ -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);