From 36cc68f94a51839e5a5220407a0e235e447955f2 Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Thu, 26 Jan 2023 09:20:20 +0100 Subject: [PATCH] Fix Hound related issue [SCI-7585] --- app/javascript/packs/vue/repository_filter.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/javascript/packs/vue/repository_filter.js b/app/javascript/packs/vue/repository_filter.js index af96afc02..508d8bf58 100644 --- a/app/javascript/packs/vue/repository_filter.js +++ b/app/javascript/packs/vue/repository_filter.js @@ -120,9 +120,12 @@ window.initRepositoryFilter = () => { this.reloadDataTable(); }, clearFilters() { - this.filters.forEach(filter => { - filter.data.parameters = {}; - }); + this.filters = this.filters + .map(filter => { + const newFilter = {...filter}; + newFilter.data["parameters"] = {}; + return newFilter; + }); this.filterName = null; this.dataTableElement.removeAttr('data-repository-filter-json'); $('#modalSaveRepositoryTableFilter').data('repositoryTableFilterId', null);