Merge branch 'main' of https://github.com/authorizerdev/authorizer into fix/dashboard

This commit is contained in:
Anik Ghosh
2022-01-31 13:29:38 +05:30
60 changed files with 149 additions and 147 deletions

View File

@@ -64,6 +64,7 @@ export const UserDetailsQuery = `
birthdate
phone_number
picture
signup_methods
roles
created_at
}

View File

@@ -63,6 +63,7 @@ interface userDataTypes {
birthdate: string;
phone_number: string;
picture: string;
signup_methods: string;
roles: [string];
created_at: number;
}

View File

@@ -51,7 +51,10 @@ export const getObjectDiff = (obj1: any, obj2: any) => {
} else if (
_.isEqual(obj1[key], obj2[key]) ||
(obj1[key] === null && obj2[key] === '') ||
(obj1[key] === [] && obj2[key] === null)
(obj1[key] &&
Array.isArray(obj1[key]) &&
obj1[key].length === 0 &&
obj2[key] === null)
) {
const resultKeyIndex = result.indexOf(key);
result.splice(resultKeyIndex, 1);