From: Stephen Smith Date: Mon, 2 Aug 2021 20:45:55 +0000 (-0400) Subject: 17690: Add guard against undefined user in ssh key page X-Git-Tag: 2.3.0~8^2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/9deadbed533951f400aa2f626af04ccac21fe865 17690: Add guard against undefined user in ssh key page Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- diff --git a/src/views/ssh-key-panel/ssh-key-panel.tsx b/src/views/ssh-key-panel/ssh-key-panel.tsx index 0c86b364..672b1bf3 100644 --- a/src/views/ssh-key-panel/ssh-key-panel.tsx +++ b/src/views/ssh-key-panel/ssh-key-panel.tsx @@ -11,7 +11,7 @@ import { SshKeyPanelRoot, SshKeyPanelRootDataProps, SshKeyPanelRootActionProps } const mapStateToProps = (state: RootState): SshKeyPanelRootDataProps => { const sshKeys = state.auth.sshKeys.filter((key) => { - return key.authorizedUserUuid == state.auth.user.uuid; + return key.authorizedUserUuid == (state.auth.user ? state.auth.user.uuid : null); }); return {