createBreakToken contains a return statement which should be removed.
First thanks for the great job done on this project.
About the issue: everything is in the title.
This line https://gitlab.pagedmedia.org/tools/pagedjs/blob/master/src/chunker/layout.js#L288 once removed, fixes a bug that occurs when the content at the end of a page is overflowing only by its margin box. The rest of the document, after the margin box, is then not visible as the return statement acts like a noop instead of using the
closest element with data-ref as mentioned in the comment just two lines above.