fix(frontend): check for field length when comparing edited member/user to current

This commit is contained in:
Sam 2023-03-21 16:22:37 +01:00
parent f790c57447
commit 90667bc285
No known key found for this signature in database
GPG Key ID: B4EF20DDE721CAA1
2 changed files with 2 additions and 0 deletions

View File

@ -88,6 +88,7 @@
const fieldsEqual = (arr1: Field[], arr2: Field[]) => {
if (arr1?.length !== arr2?.length) return false;
if (!arr1.every((_, i) => arr1[i].entries.length === arr2[i].entries.length)) return false;
if (!arr1.every((_, i) => arr1[i].name === arr2[i].name)) return false;
return arr1.every((_, i) =>

View File

@ -75,6 +75,7 @@
const fieldsEqual = (arr1: Field[], arr2: Field[]) => {
if (arr1?.length !== arr2?.length) return false;
if (!arr1.every((_, i) => arr1[i].entries.length === arr2[i].entries.length)) return false;
if (!arr1.every((_, i) => arr1[i].name === arr2[i].name)) return false;
return arr1.every((_, i) =>