Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Use lodash.isEqual to compare the object equality

天舟e1864ed21669
diff --git a/frontend/src/miragejs/routes/index.js b/frontend/src/miragejs/routes/index.js
index 5a5c978aff..69ff937242 100644
--- a/frontend/src/miragejs/routes/index.js
+++ b/frontend/src/miragejs/routes/index.js
@@ -2,6 +2,7 @@
* Mirage JS guide on Routes: https://miragejs.com/docs/route-handlers/functions
*/
import { Response } from "miragejs";
+import isEqual from "lodash-es/isEqual";
import { TaskBuiltinFieldId } from "../../plugins";
import { ALL_DATABASE_NAME } from "../../types";
@@ -282,7 +283,7 @@ export default function routes() {
for (const fieldId in attrs.payload) {
const oldValue = task.payload[fieldId];
const newValue = attrs.payload[fieldId];
- if (oldValue != newValue) {
+ if (!isEqual(oldValue, newValue)) {
changeList.push({
fieldId: fieldId,
oldValue: task.payload[fieldId],