mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
fix(ui): drop pointless equal checks
This commit is contained in:
committed by
Łukasz Mierzwa
parent
6b5b53d51d
commit
e4ec699abb
@@ -21,7 +21,6 @@
|
||||
"bricks.js": "1.8.0",
|
||||
"copy-to-clipboard": "3.3.1",
|
||||
"csshake": "1.5.3",
|
||||
"fast-deep-equal": "3.1.1",
|
||||
"favico.js": "0.3.10",
|
||||
"fontfaceobserver": "2.1.0",
|
||||
"lodash": "4.17.15",
|
||||
|
||||
@@ -2,8 +2,6 @@ import { observable, action, computed, toJS } from "mobx";
|
||||
|
||||
import throttle from "lodash.throttle";
|
||||
|
||||
import equal from "fast-deep-equal";
|
||||
|
||||
import qs from "qs";
|
||||
|
||||
import moment from "moment";
|
||||
@@ -403,7 +401,6 @@ class AlertStore {
|
||||
}
|
||||
|
||||
let updates = {};
|
||||
// update data dicts if they changed
|
||||
for (const key of [
|
||||
"colors",
|
||||
"counters",
|
||||
@@ -412,13 +409,9 @@ class AlertStore {
|
||||
"upstreams",
|
||||
"receivers",
|
||||
]) {
|
||||
if (!equal(this.data[key], result[key])) {
|
||||
updates[key] = result[key];
|
||||
}
|
||||
}
|
||||
if (Object.keys(updates).length > 0) {
|
||||
this.data = Object.assign(this.data, updates);
|
||||
updates[key] = result[key];
|
||||
}
|
||||
this.data = Object.assign(this.data, updates);
|
||||
|
||||
// before storing new version check if we need to reload
|
||||
if (
|
||||
@@ -435,9 +428,7 @@ class AlertStore {
|
||||
}
|
||||
|
||||
// settings exported via API
|
||||
if (!equal(this.settings.values, result.settings)) {
|
||||
this.settings.values = result.settings;
|
||||
}
|
||||
this.settings.values = result.settings;
|
||||
|
||||
this.status.setIdle();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user