mirror of
https://github.com/nasa/openmct.git
synced 2024-12-30 01:48:51 +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
|
||||
*/
|
||||
updateFiltersAndRefresh: function (updatedFilters) {
|
||||
if (this.filters && !_.isEqual(this.filters, updatedFilters)) {
|
||||
this.filters = updatedFilters;
|
||||
let deepCopiedFilters = JSON.parse(JSON.stringify(updatedFilters));
|
||||
|
||||
if (this.filters && !_.isEqual(this.filters, deepCopiedFilters)) {
|
||||
console.log('actually updating');
|
||||
this.filters = deepCopiedFilters;
|
||||
this.reset();
|
||||
if (this.unsubscribe) {
|
||||
this.unsubscribe();
|
||||
@ -386,7 +389,7 @@ define([
|
||||
}
|
||||
this.fetch();
|
||||
} else {
|
||||
this.filters = updatedFilters;
|
||||
this.filters = deepCopiedFilters;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user