Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
fix env typo
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Kracht <[email protected]>
  • Loading branch information
stefan-kracht committed Dec 22, 2023
1 parent c563cdb commit 50ccaaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/errorHandling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const getPermissionStatus = (error: unknown): PermissionStatus => {
if (isApiErrorSchema(error)) {
if (
error.response.status === 401 &&
process.env.VITE_IS_ENTERPRISE === "true"
process.env.VITE?.VITE_IS_ENTERPRISE === "true"
) {
window.location.href = enterpriseConfig.logoutPath;
}
Expand Down
2 changes: 1 addition & 1 deletion src/componentsNext/UserMenu/LogoutButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const LogoutButton = () => {
const { t } = useTranslation();
const { setApiKey: storeApiKey } = useApiActions();

const isEnterprise = process.env.VITE_IS_ENTERPRISE === "true";
const isEnterprise = process.env.VITE?.VITE_IS_ENTERPRISE === "true";

const logout = () => {
storeApiKey(null);
Expand Down

0 comments on commit 50ccaaa

Please sign in to comment.