@nira-opencrvs/toolkit 1.9.13-rc.e33187f → 1.9.13-rc.ffbed36

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.
@@ -5678,15 +5678,16 @@ function isRejected(actions) {
5678
5678
  return actions.at(-1)?.type === ActionType.REJECT;
5679
5679
  }
5680
5680
  function isEscalated(actions) {
5681
- return actions.reduce((prev, action) => {
5682
- if (action.type === ActionType.ESCALATE && "declaration" in action) {
5681
+ for (let i = actions.length - 1; i >= 0; i--) {
5682
+ const action = actions[i];
5683
+ if ("declaration" in action) {
5683
5684
  const escalated = action.declaration?.["review.escalated"];
5684
5685
  if (typeof escalated === "boolean") {
5685
5686
  return escalated;
5686
5687
  }
5687
5688
  }
5688
- return prev;
5689
- }, false);
5689
+ }
5690
+ return false;
5690
5691
  }
5691
5692
  function isPotentialDuplicate(actions) {
5692
5693
  return actions.reduce((prev, { type }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nira-opencrvs/toolkit",
3
- "version": "1.9.13-rc.e33187f",
3
+ "version": "1.9.13-rc.ffbed36",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {