Skip to content

Commit a8d1354

Browse files
committed
Avoid breaks on elements that are exactly 1 page
1 parent e26fdf4 commit a8d1354

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugin/pagebreaks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ Worker.prototype.toContainer = function toContainer() {
8686
var endPage = Math.floor(clientRect.bottom / pxPageHeight);
8787
var nPages = Math.abs(clientRect.bottom - clientRect.top) / pxPageHeight;
8888

89-
// Turn on rules.before if the el is broken and is less than a page long.
90-
if (endPage !== startPage && nPages < 1) {
89+
// Turn on rules.before if the el is broken and is at most one page long.
90+
if (endPage !== startPage && nPages <= 1) {
9191
rules.before = true;
9292
}
9393
}

0 commit comments

Comments
 (0)