mistercrunch commented on a change in pull request #4651: [WiP] [explore]
proper filtering of NULLs and ''
URL:
https://github.com/apache/incubator-superset/pull/4651#discussion_r176615844
##########
File path: superset/assets/javascripts/components/AlteredSliceTag.jsx
##########
@@ -61,7 +61,7 @@ export default class AlteredSliceTag extends React.Component
{
return '[]';
}
return value.map((v) => {
- const filterVal = v.val.constructor === Array ? `[${v.val.join(',
')}]` : v.val;
+ const filterVal = v.val && v.val.constructor === Array ?
`[${v.val.join(', ')}]` : v.val;
Review comment:
Didn't write that line but FWIW someone on StackOverflow says it's the best
way
https://stackoverflow.com/questions/767486/how-do-you-check-if-a-variable-is-an-array-in-javascript
----------------------------------------------------------------
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