A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
editor: fix crash due to `undefined is not an object (evaluating 'a.nodeSize')` (#5553)
Abdullah Atta734f491e8d69
diff --git a/packages/editor/patches/prosemirror-model+1.19.4.patch b/packages/editor/patches/prosemirror-model+1.19.4.patchnew file mode 100644index 000000000..2ba086a72--- /dev/null+++ b/packages/editor/patches/prosemirror-model+1.19.4.patch@@ -0,0 +1,24 @@+diff --git a/node_modules/prosemirror-model/dist/index.cjs b/node_modules/prosemirror-model/dist/index.cjs+index 1c45f1c..c92ec8d 100644+--- a/node_modules/prosemirror-model/dist/index.cjs++++ b/node_modules/prosemirror-model/dist/index.cjs+@@ -98,6 +98,7 @@ var Fragment = function () {+ var nodeStart = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;+ var parent = arguments.length > 4 ? arguments[4] : undefined;+ for (var i = 0, pos = 0; pos < to; i++) {++ if (i >= this.content.length) break;+ var child = this.content[i],+ end = pos + child.nodeSize;+ if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) {+diff --git a/node_modules/prosemirror-model/dist/index.js b/node_modules/prosemirror-model/dist/index.js+index 9c37a40..a215c60 100644+--- a/node_modules/prosemirror-model/dist/index.js++++ b/node_modules/prosemirror-model/dist/index.js+@@ -84,6 +84,7 @@ class Fragment {+ */+ nodesBetween(from, to, f, nodeStart = 0, parent) {+ for (let i = 0, pos = 0; pos < to; i++) {++ if (i >= this.content.length) break;+ let child = this.content[i], end = pos + child.nodeSize;+ if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) {+ let start = pos + 1;