Skip to content

Commit 1e882a9

Browse files
committed
Fix issue when header data is blank
1 parent 1248d0e commit 1e882a9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/super-editor/src/extensions/pagination/pagination-helpers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export const initPaginationData = async (editor) => {
5555
* @returns {Promise<Object>} An object containing the height of the section, the section editor and the section container
5656
*/
5757
const getSectionHeight = async (editor, data) => {
58+
if (!data) return {};
5859
return new Promise((resolve) => {
5960
const editorContainer = document.createElement('div');
6061
editorContainer.className = 'super-editor';

0 commit comments

Comments
 (0)