@prosekit/core 0.5.1 → 0.5.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.
@@ -463,7 +463,7 @@ function subtractInput(a, b) {
463
463
  if (!a)
464
464
  return null;
465
465
  if (!b)
466
- return [];
466
+ return [...a];
467
467
  return arraySubstract(a, b);
468
468
  }
469
469
  function unionChildren(a, b) {
@@ -478,7 +478,9 @@ function subtractChildren(a, b) {
478
478
  const merged = new Map(a);
479
479
  for (const [key, valueB] of b.entries()) {
480
480
  const valueA = a.get(key);
481
- merged.set(key, valueA ? subtractFacetNode(valueA, valueB) : valueB);
481
+ if (valueA) {
482
+ merged.set(key, subtractFacetNode(valueA, valueB));
483
+ }
482
484
  }
483
485
  return merged;
484
486
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prosekit/core",
3
3
  "type": "module",
4
- "version": "0.5.1",
4
+ "version": "0.5.2",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "ocavue",