@tiptap/core 2.22.0 → 2.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/NodePos.d.ts.map +1 -1
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +4 -0
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/NodePos.ts +6 -0
package/dist/index.umd.js
CHANGED
|
@@ -4210,6 +4210,10 @@
|
|
|
4210
4210
|
const isBlock = node.isBlock && !node.isTextblock;
|
|
4211
4211
|
const isNonTextAtom = node.isAtom && !node.isText;
|
|
4212
4212
|
const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1);
|
|
4213
|
+
// Check if targetPos is within valid document range
|
|
4214
|
+
if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) {
|
|
4215
|
+
return;
|
|
4216
|
+
}
|
|
4213
4217
|
const $pos = this.resolvedPos.doc.resolve(targetPos);
|
|
4214
4218
|
if (!isBlock && $pos.depth <= this.depth) {
|
|
4215
4219
|
return;
|