18315: Adds file upload test proving that the UI is correctly updated.
[arvados-workbench2.git] / src / views / ssh-key-panel / ssh-key-panel.tsx
index f2b7dd3c43793b8b3f73523342e426cff2f6af64..24ca3468d181bc37dafe9d51f2cbdc4098fc7ae5 100644 (file)
@@ -10,8 +10,8 @@ import { openSshKeyContextMenu } from 'store/context-menu/context-menu-actions';
 import { SshKeyPanelRoot, SshKeyPanelRootDataProps, SshKeyPanelRootActionProps } from 'views/ssh-key-panel/ssh-key-panel-root';
 
 const mapStateToProps = (state: RootState): SshKeyPanelRootDataProps => {
-    const sshKeys = state.auth.sshKeys = state.auth.sshKeys.filter((key) => {
-      return key.authorizedUserUuid == state.auth.user.uuid;
+    const sshKeys = state.auth.sshKeys.filter((key) => {
+      return key.authorizedUserUuid === (state.auth.user ? state.auth.user.uuid : null);
     });
 
     return {