Skip to content

Commit 0d541ba

Browse files
test fix
1 parent b0ac008 commit 0d541ba

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/manager/src/features/Account/SwitchAccountDrawer.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,18 @@ export const SwitchAccountDrawer = (props: Props) => {
159159
userType: isIAMDelegationEnabled ? 'delegate' : 'proxy',
160160
});
161161
onClose(event);
162-
location.replace('/linodes');
162+
163+
// Only redirect to /linodes for IAM delegate users
164+
if (isIAMDelegationEnabled) {
165+
location.replace('/linodes');
166+
} else {
167+
location.reload();
168+
}
163169
} catch {
164170
// Error is handled by createTokenError.
165171
}
166172
},
167-
[createToken, isProxyUserType, updateCurrentToken, revokeToken]
173+
[createToken, updateCurrentToken, revokeToken, isIAMDelegationEnabled]
168174
);
169175

170176
const [isSwitchingChildAccounts, setIsSwitchingChildAccounts] =

0 commit comments

Comments
 (0)