Skip to content

Commit

Permalink
fix: compare diff (#12010)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmadao committed May 16, 2024
1 parent 4293240 commit e0552e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/utils/v1/common.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { snakeCase } from "lodash-es";
import { snakeCase, isEqual } from "lodash-es";
import { humanizeTs } from "../util";

export const calcUpdateMask = (a: any, b: any, toSnakeCase = false) => {
Expand All @@ -7,7 +7,7 @@ export const calcUpdateMask = (a: any, b: any, toSnakeCase = false) => {
const bKeys = new Set(Object.keys(b));

for (const key of aKeys) {
if (a[key] !== b[key]) {
if (!isEqual(a[key], b[key])) {
updateMask.add(key);
}
bKeys.delete(key);
Expand Down

0 comments on commit e0552e2

Please sign in to comment.