Skip to content

Commit

Permalink
fix: add latest compareDict function
Browse files Browse the repository at this point in the history
  • Loading branch information
sbgap committed Nov 12, 2024
1 parent b9cb397 commit 8bb0189
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/EscalationRuleList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -713,8 +713,8 @@ export default {
if (a === null) return true
for (const key in a) {
if (b[key] === undefined) return false
if (typeof a[key] === typeof({})) {
if (!this.compareDict(a[key], b[key])) return false
if (a[key] !== null && typeof a[key] === typeof({})) {
if (b[key] === null || a[key].length !== b[key].length || !this.compareDict(a[key], b[key])) return false
}
else if (a[key] !== b[key]) return false
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/NotificationGroupList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export default {
if (a === null) return true
for (const key in a) {
if (b[key] === undefined) return false
if (typeof a[key] === typeof({})) {
if (a[key] !== null && typeof a[key] === typeof({})) {
if (b[key] === null || a[key].length !== b[key].length || !this.compareDict(a[key], b[key])) return false
}
else if (a[key] !== b[key]) return false
Expand Down
4 changes: 2 additions & 2 deletions src/components/NotificationRuleList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1223,8 +1223,8 @@ export default {
if (a === null) return true
for (const key in a) {
if (b[key] === undefined) return false
if (typeof a[key] === typeof({})) {
if (!this.compareDict(a[key], b[key])) return false
if (a[key] !== null && typeof a[key] === typeof({})) {
if (b[key] === null || a[key].length !== b[key].length || !this.compareDict(a[key], b[key])) return false
}
else if (a[key] !== b[key]) return false
}
Expand Down

0 comments on commit 8bb0189

Please sign in to comment.