eschutho commented on code in PR #20281:
URL: https://github.com/apache/superset/pull/20281#discussion_r904062320
##########
superset-frontend/src/explore/components/DatasourcePanel/index.tsx:
##########
@@ -265,8 +275,9 @@ export default function DataSourcePanel({
],
keepDiacritics: true,
baseSort: (a, b) =>
- Number(b.item.is_certified) - Number(a.item.is_certified) ||
- String(a.rankedValue).localeCompare(b.rankedValue),
+ Number(b?.item?.is_certified ?? 0) -
Review Comment:
what's the scenario where a falsy value wouldn't be coerced to a 0 here? I'm
thinking in the original implementation of Number(boolean or undefined) rather
than Number(boolean or undefined ?? 0)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]