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) rather than 
Number(boolean ?? 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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to