17914: Replaces deprecated substr() with substring().
[arvados-workbench2.git] / src / store / auth / auth-reducer.ts
index ce836a55600db742de78bd49a59108b5a957c4c0..c109acaf5184d72a133f94745f9c337dee4909af 100644 (file)
@@ -79,12 +79,12 @@ export const authReducer = (services: ServiceRepository) => (state = initialStat
                 apiToken: token,
                 apiTokenExpiration: tokenExpiration,
                 apiTokenLocation: tokenLocation,
-                homeCluster: user.uuid.substr(0, 5)
+                homeCluster: user.uuid.substring(0, 5)
             }),
         LOGIN: () => state,
         LOGOUT: () => ({ ...state, apiToken: undefined }),
         USER_DETAILS_SUCCESS: (user: User) =>
-            ({ ...state, user, homeCluster: user.uuid.substr(0, 5) }),
+            ({ ...state, user, homeCluster: user.uuid.substring(0, 5) }),
         SET_SSH_KEYS: (sshKeys: SshKeyResource[]) => ({ ...state, sshKeys }),
         ADD_SSH_KEY: (sshKey: SshKeyResource) =>
             ({ ...state, sshKeys: state.sshKeys.concat(sshKey) }),