mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-15 19:27:51 +01:00
Merge pull request #8904 from streetwriters/editor/fix-heading-plugin
editor: fix crash in heading plugin when pasting markdown content
This commit is contained in:
@@ -365,6 +365,8 @@ const headingUpdatePlugin = new Plugin({
|
||||
|
||||
newDoc.descendants((newNode, pos) => {
|
||||
if (newNode.type.name === "heading") {
|
||||
if (pos >= oldDoc.content.size) return;
|
||||
|
||||
const oldNode = oldDoc.nodeAt(pos);
|
||||
if (
|
||||
oldNode &&
|
||||
|
||||
Reference in New Issue
Block a user