prosemirror-view 1.32.5 → 1.32.6

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.32.6 (2023-12-08)
2
+
3
+ ### Bug fixes
4
+
5
+ Fix a bug that could cause view updates to crash in rare situations where inline nodes were added around decorations.
6
+
1
7
  ## 1.32.5 (2023-12-04)
2
8
 
3
9
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -2429,6 +2429,10 @@ function iterDeco(parent, deco, onWidget, onNode) {
2429
2429
  end = cutAt;
2430
2430
  index = -1;
2431
2431
  }
2432
+ } else {
2433
+ while (decoIndex < locals.length && locals[decoIndex].to <= end) {
2434
+ decoIndex++;
2435
+ }
2432
2436
  }
2433
2437
 
2434
2438
  var outerDeco = _child.isInline && !_child.isLeaf ? active.filter(function (d) {
package/dist/index.js CHANGED
@@ -2023,6 +2023,10 @@ function iterDeco(parent, deco, onWidget, onNode) {
2023
2023
  index = -1;
2024
2024
  }
2025
2025
  }
2026
+ else {
2027
+ while (decoIndex < locals.length && locals[decoIndex].to <= end)
2028
+ decoIndex++;
2029
+ }
2026
2030
  let outerDeco = child.isInline && !child.isLeaf ? active.filter(d => !d.inline) : active.slice();
2027
2031
  onNode(child, outerDeco, deco.forChild(offset, child), index);
2028
2032
  offset = end;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prosemirror-view",
3
- "version": "1.32.5",
3
+ "version": "1.32.6",
4
4
  "description": "ProseMirror's view component",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
package/src/viewdesc.ts CHANGED
@@ -1449,6 +1449,8 @@ function iterDeco(
1449
1449
  end = cutAt
1450
1450
  index = -1
1451
1451
  }
1452
+ } else {
1453
+ while (decoIndex < locals.length && locals[decoIndex].to <= end) decoIndex++
1452
1454
  }
1453
1455
 
1454
1456
  let outerDeco = child.isInline && !child.isLeaf ? active.filter(d => !d.inline) : active.slice()