diff options
-rw-r--r-- | server/sonar-web/src/main/coffee/issues/models/state.coffee | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/coffee/issues/models/state.coffee b/server/sonar-web/src/main/coffee/issues/models/state.coffee index 1704bfe3cd5..887b988f8aa 100644 --- a/server/sonar-web/src/main/coffee/issues/models/state.coffee +++ b/server/sonar-web/src/main/coffee/issues/models/state.coffee @@ -29,10 +29,18 @@ define [ q + _areQueriesEqual: (a, b) -> + equal = Object.keys(a).length == Object.keys(b).length + Object.keys(a).forEach (key) -> + equal = equal && (a[key] == b[key]) + equal + + updateFilter: (obj) -> - filter = @get 'query' - _.extend filter, obj - @setQuery @cleanQuery filter + oldQuery = @get('query') + query = _.extend {}, oldQuery, obj + query = @cleanQuery query + @setQuery query unless @_areQueriesEqual oldQuery, query setQuery: (query) -> |