fix: prevent prop array mutation by spreading allRecipients before sort (#2840)

This commit is contained in:
Abdulazez (Abza)
2026-05-26 07:09:54 +03:00
committed by GitHub
parent fa2c53bd72
commit 5421b0d1cc
@@ -142,7 +142,7 @@ export const DocumentSigningPageViewV1 = ({
return undefined;
}
const sortedRecipients = allRecipients.sort((a, b) => {
const sortedRecipients = [...allRecipients].sort((a, b) => {
// Sort by signingOrder first (nulls last), then by id
if (a.signingOrder === null && b.signingOrder === null) {
return a.id - b.id;