@markwharton/liquidplanner 1.4.0 → 1.4.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/client.js +6 -2
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -276,9 +276,13 @@ export class LPClient {
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
const ancestorResults = await Promise.all([...assignmentsByParent.entries()].map(async ([parentId, assignment]) => {
|
|
279
|
-
const { ancestors } = await this.getItemAncestors(assignment.id);
|
|
280
|
-
return { parentId, ancestors };
|
|
279
|
+
const { ancestors, error } = await this.getItemAncestors(assignment.id);
|
|
280
|
+
return { parentId, ancestors, error };
|
|
281
281
|
}));
|
|
282
|
+
const firstError = ancestorResults.find(r => r.error);
|
|
283
|
+
if (firstError) {
|
|
284
|
+
return { error: firstError.error };
|
|
285
|
+
}
|
|
282
286
|
for (const { parentId, ancestors } of ancestorResults) {
|
|
283
287
|
ancestorMap.set(parentId, ancestors);
|
|
284
288
|
}
|