john-bodley commented on a change in pull request #5241: [Explore] Handle empty 
metrics control data
URL: 
https://github.com/apache/incubator-superset/pull/5241#discussion_r196299066
 
 

 ##########
 File path: 
superset/assets/src/explore/components/controls/AdhocFilterControl.jsx
 ##########
 @@ -223,7 +223,7 @@ export default class AdhocFilterControl extends 
React.Component {
       } else if (option instanceof AdhocMetric) {
         return { ...option, filterOptionName: '_adhocmetric_' + option.label };
       }
-      return null;
+      return '';
 
 Review comment:
   Do we really want to return an empty string here? Generally checking for 
`null` is preferable to an empty string. 

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to