mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Replace a bunch of Array.prototype.forEach()
cases with for...of
loops instead
Using `for...of` is a modern and generally much nicer pattern, since it gets rid of unnecessary callback-functions. (In a couple of spots, a "regular" `for` loop had to be used.)
This commit is contained in:
parent
da0e7ea969
commit
da22146b95
14 changed files with 67 additions and 71 deletions
|
@ -1370,9 +1370,9 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
|||
// The previous clipping group content can go out of order -- resetting
|
||||
// cached clipGroups.
|
||||
current.clipGroup = null;
|
||||
this.extraStack.forEach(function (prev) {
|
||||
for (const prev of this.extraStack) {
|
||||
prev.clipGroup = null;
|
||||
});
|
||||
}
|
||||
// Intersect with the previous clipping path.
|
||||
clipPath.setAttributeNS(null, "clip-path", current.activeClipUrl);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue