kgabryje commented on code in PR #32341:
URL: https://github.com/apache/superset/pull/32341#discussion_r1965223982


##########
superset-frontend/src/dashboard/hooks/useDownloadScreenshot.ts:
##########
@@ -44,9 +43,12 @@ export const useDownloadScreenshot = (
   const activeTabs = useSelector(
     (state: RootState) => state.dashboardState.activeTabs || undefined,
   );
-  const anchor = useSelector(
-    (state: RootState) =>
-      last(state.dashboardState.directPathToChild) || undefined,
+  const anchor = useSelector((state: RootState) =>

Review Comment:
   I think that last looks much more readable, especially when we have such 
long array names. Maybe we should either keep lodash or implement our own 
`last` util function?



-- 
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]

Reply via email to