Fix TypeError by rotation (#890)

Fixes the error in the PDF multitool when rotating all pages at the same time.
This commit is contained in:
Ludy 2024-03-09 13:18:00 +01:00 committed by GitHub
parent 142e11a59a
commit 82c4e9cf41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -179,7 +179,9 @@ class PdfContainer {
rotateAll(deg) {
for (var i = 0; i < this.pagesContainer.childNodes.length; i++) {
const img = this.pagesContainer.childNodes[i].querySelector("img");
const child = this.pagesContainer.children[i];
if (!child) continue;
const img = child.querySelector("img");
if (!img) continue;
this.rotateElement(img, deg);
}