17690: Add guard against undefined user in ssh key page 17690-user-ssh-key-page
authorStephen Smith <stephen@curii.com>
Mon, 2 Aug 2021 20:45:55 +0000 (16:45 -0400)
committerStephen Smith <stephen@curii.com>
Mon, 2 Aug 2021 20:45:55 +0000 (16:45 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/views/ssh-key-panel/ssh-key-panel.tsx

index 0c86b3640d9ea18f9890ff2ef1bb7270fa8afb23..672b1bf316339eb3a49053f12657d5519639f575 100644 (file)
@@ -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 {