From a3177c6712957721079f24e489c0f296a772d7a3 Mon Sep 17 00:00:00 2001 From: Frederico Santos Date: Sat, 13 Jul 2024 02:22:02 +0100 Subject: [PATCH] feat: Update isBeta check in utils.ts to use import.meta.env.MODE The current implementation of the isBeta check in utils.ts is using import.meta.env.DEV, which gives the same value for both beta and dev environments. This commit updates the check to use import.meta.env.MODE === "beta" to accurately determine if the environment is beta. This ensures that the unlock all code is only accessible in the beta environment and not in production environments. --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index c68a0a283d6..954ed7cc3fa 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -292,7 +292,7 @@ export const apiUrl = localServerUrl ?? "https://api.pokerogue.net"; // used to disable api calls when isLocal is true and a server is not found export let isLocalServerConnected = true; -export const isBeta = import.meta.env.DEV; // this checks to see if the env mode is development. Technically this gives the same value for beta AND for dev envs +export const isBeta = import.meta.env.MODE === "beta"; // this checks to see if the env mode is development. Technically this gives the same value for beta AND for dev envs export function setCookie(cName: string, cValue: string): void { const expiration = new Date();