hierarchical-approval 3.2.0 → 3.3.0

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/nestjs.js CHANGED
@@ -279,8 +279,7 @@ var MemoryAdapter = class {
279
279
  async getInstancesByApprover(tenantId, approverId, opts) {
280
280
  const all = [...this.instances.values()].filter((i) => {
281
281
  if (i.tenantId !== tenantId || i.status !== "pending") return false;
282
- const currentLevel = i.levels.find((l) => l.level === i.currentLevel);
283
- return currentLevel?.approverIds.includes(approverId) ?? false;
282
+ return i.levels.some((l) => l.status === "pending" && l.approverIds.includes(approverId));
284
283
  });
285
284
  return paginate(
286
285
  all.map((i) => reviveDates(deepClone(i))),