Skip to content

Commit 1578619

Browse files
andrii-harbourharbournick
authored andcommitted
fix: prevent processing of text nodes in AutoPageNumberNodeView
1 parent 0b66b1e commit 1578619

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/super-editor/src/extensions/page-number/page-number.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export class AutoPageNumberNodeView {
215215
const { dispatch } = this.view;
216216

217217
const node = state.doc.nodeAt(pos);
218-
if (!node) return;
218+
if (!node || node.isText) return;
219219

220220
const currentMarks = node.attrs.marksAsAttrs || [];
221221
const newMarks = marks.map((m) => ({ type: m.type.name, attrs: m.attrs }));

0 commit comments

Comments
 (0)