Skip to content

Commit e257949

Browse files
fix: prevent processing of text nodes in AutoPageNumberNodeView (#768)
Co-authored-by: aorlov <andrii@harbourshare.com>
1 parent 6b796ce commit e257949

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)