feat: reptile feedback and resolved type failure

This commit is contained in:
=
2025-06-11 15:20:46 +05:30
parent d2c5603664
commit 81df491d5e
6 changed files with 17 additions and 10 deletions
@@ -158,7 +158,7 @@ export const AccessPolicyForm = ({
?.sort((a, b) => (a?.sequence || 0) - (b?.sequence || 0))
.reduce(
(acc, curr) => {
if (acc.length > 1 && acc[acc.length - 1].sequence === curr.sequence) {
if (acc.length && acc[acc.length - 1].sequence === curr.sequence) {
acc[acc.length - 1][curr.type]?.push(curr);
return acc;
}