Skip to content

Commit 74140d2

Browse files
committed
Fix bug in new pagebreaks plugin
1 parent dcfe815 commit 74140d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugin/pagebreaks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var orig = {
77
Worker.prototype.toContainer = function toContainer() {
88
return orig.toContainer.call(this).then(function toContainer_pagebreak() {
99
// Enable page-breaks.
10-
var pageBreaks = source.querySelectorAll('.html2pdf__page-break');
10+
var pageBreaks = this.prop.container.querySelectorAll('.html2pdf__page-break');
1111
var pxPageHeight = this.prop.pageSize.inner.px.height;
1212
Array.prototype.forEach.call(pageBreaks, function pageBreak_loop(el) {
1313
el.style.display = 'block';

0 commit comments

Comments
 (0)