fix: prevent React state mutation by spreading envelope.recipients before sort (#2839)

This commit is contained in:
Abdulazez (Abza)
2026-05-26 07:04:48 +03:00
committed by GitHub
parent 6ac67e646c
commit fa2c53bd72
@@ -294,7 +294,7 @@ export const EnvelopeSigningProvider = ({
return null;
}
const sortedRecipients = envelope.recipients.sort((a, b) => {
const sortedRecipients = [...envelope.recipients].sort((a, b) => {
// Sort by signingOrder first (nulls last), then by id
if (a.signingOrder === null && b.signingOrder === null) {
return a.id - b.id;