ktmud commented on a change in pull request #13221:
URL: https://github.com/apache/superset/pull/13221#discussion_r583371682
##########
File path: superset-frontend/.eslintrc.js
##########
@@ -226,6 +227,7 @@ module.exports = {
'no-mixed-operators': 0,
'no-multi-assign': 0,
'no-multi-spaces': 0,
+ 'no-nested-ternary': 0,
Review comment:
`'name' in item` is needed for type inference so to avoid forced type
conversion as `item` can be of many types, otherwise this could also be as
simple as `item?.name || item || null`.
Here's the error with your approach:
<img width="1143" alt="Screen Shot 2021-02-25 at 6 10 55 PM"
src="https://user-images.githubusercontent.com/335541/109253871-95b66580-77a5-11eb-93fc-be914d8fe470.png">
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]