mirror of
https://github.com/nasa/openmct.git
synced 2025-01-01 19:06:40 +00:00
make a copy of filters before checking isEqual
- to prevent using same pointer
This commit is contained in:
parent
459b2060a5
commit
ca022b8a28
@ -377,8 +377,11 @@ define([
|
|||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
updateFiltersAndRefresh: function (updatedFilters) {
|
updateFiltersAndRefresh: function (updatedFilters) {
|
||||||
if (this.filters && !_.isEqual(this.filters, updatedFilters)) {
|
let deepCopiedFilters = JSON.parse(JSON.stringify(updatedFilters));
|
||||||
this.filters = updatedFilters;
|
|
||||||
|
if (this.filters && !_.isEqual(this.filters, deepCopiedFilters)) {
|
||||||
|
console.log('actually updating');
|
||||||
|
this.filters = deepCopiedFilters;
|
||||||
this.reset();
|
this.reset();
|
||||||
if (this.unsubscribe) {
|
if (this.unsubscribe) {
|
||||||
this.unsubscribe();
|
this.unsubscribe();
|
||||||
@ -386,7 +389,7 @@ define([
|
|||||||
}
|
}
|
||||||
this.fetch();
|
this.fetch();
|
||||||
} else {
|
} else {
|
||||||
this.filters = updatedFilters;
|
this.filters = deepCopiedFilters;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user