@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.
- package/dist/prosekit-core.js +4 -2
- package/package.json +1 -1
package/dist/prosekit-core.js
CHANGED
@@ -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
|
-
|
481
|
+
if (valueA) {
|
482
|
+
merged.set(key, subtractFacetNode(valueA, valueB));
|
483
|
+
}
|
482
484
|
}
|
483
485
|
return merged;
|
484
486
|
}
|