17690: Add guard against undefined user in ssh key page
[arvados-workbench2.git] / 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 {