@outbuild-company/schedule-core 1.6.0 → 1.6.1
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/index.cjs
CHANGED
|
@@ -10483,9 +10483,13 @@ async function createActivityCore(action, deps, opts = {}) {
|
|
|
10483
10483
|
const initialTouched = /* @__PURE__ */ new Set([newId]);
|
|
10484
10484
|
if (parent) initialTouched.add(parent.id);
|
|
10485
10485
|
const parentWasLeaf = parent !== null && adapter.getChildren(parent.id).length === 0;
|
|
10486
|
+
const parentCustomId = parentWasLeaf ? parent?.customId : null;
|
|
10486
10487
|
const beforeSnap = opts.skipBeforeSnap ? /* @__PURE__ */ new Map() : await snapshotActivities(adapter, initialTouched);
|
|
10487
10488
|
adapter.addActivity(newActivity);
|
|
10488
10489
|
applyParentMutations(action, newId, parent, adapter, parentWasLeaf);
|
|
10490
|
+
if (parentCustomId) {
|
|
10491
|
+
deps.customIdTracker.releaseCustomId(parentCustomId);
|
|
10492
|
+
}
|
|
10489
10493
|
recomputeHhCascadeForActivity(newId, adapter);
|
|
10490
10494
|
recomputeUsedCostCascadeForActivity(newId, adapter);
|
|
10491
10495
|
recomputeCostCascadeForActivity(newId, adapter);
|