You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/04/17 19:33:00 UTC

[GitHub] [incubator-pinot] aaronucsd commented on a change in pull request #4131: [TE] frontend - harleyjj/anomalies - make anomalies filterable by sub…

aaronucsd commented on a change in pull request #4131: [TE] frontend - harleyjj/anomalies - make anomalies filterable by sub…
URL: https://github.com/apache/incubator-pinot/pull/4131#discussion_r276400429
 
 

 ##########
 File path: thirdeye/thirdeye-frontend/app/pods/anomalies/controller.js
 ##########
 @@ -167,15 +173,13 @@ export default Controller.extend({
         // no filter applied, just return all
         return anomalyIds;
       }
-      let selectedAnomalies = [];
+      let selectedAnomalies = anomalyIds;
       filterMaps.forEach(map => {
-        if (anomalyFilters[map]) {
+        const selectedFilters = anomalyFilters[map];
+        // When a filter gets deleted, it leaves an empty array behind.  We need to treat null and empty array the same here
+        if (selectedFilters && Array.isArray(selectedFilters) && selectedFilters.length > 0) {
 
 Review comment:
   You can use `isEmpty(selectedFilters)` here.
   
   https://api.emberjs.com/ember/release/functions/@ember%2Futils/isEmpty

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org