Joeri Exelmans 2 年之前
父节点
当前提交
b587bf7d98
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/onion/delta.ts

+ 3 - 3
src/onion/delta.ts

@@ -398,11 +398,11 @@ export function findTxDependencies(deltas: Delta[], candidates?: Set<Delta>): Tr
       if (!deltas.includes(dependency)) {
         const txs = dependency.partOf;
         const filteredTxs = candidates !== undefined ?
-           txs.filter(d => candidates!.has(d)) : txs;
-        if (txs.length > 1) {
+           txs.filter(tx => candidates!.has(tx)) : txs;
+        if (filteredTxs.length > 1) {
           throw new Error("Error: One of the composite's dependencies is contained by multiple composites.");
         }
-        if (txs.length === 0) {
+        if (filteredTxs.length === 0) {
           // throw new Error("Assertion failed: delta " + delta.description + " depends on " + dependency.description + " but this dependency could not be found in a composite.");
           continue;
         }