@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.
- package/dist/events/index.js +5 -4
- package/package.json +1 -1
package/dist/events/index.js
CHANGED
|
@@ -5678,15 +5678,16 @@ function isRejected(actions) {
|
|
|
5678
5678
|
return actions.at(-1)?.type === ActionType.REJECT;
|
|
5679
5679
|
}
|
|
5680
5680
|
function isEscalated(actions) {
|
|
5681
|
-
|
|
5682
|
-
|
|
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
|
-
|
|
5689
|
-
|
|
5689
|
+
}
|
|
5690
|
+
return false;
|
|
5690
5691
|
}
|
|
5691
5692
|
function isPotentialDuplicate(actions) {
|
|
5692
5693
|
return actions.reduce((prev, { type }) => {
|