refactor: replace import.meta.env.DEV checks with isDevEnv() utility function

This commit is contained in:
Mursaleen Nisar 2025-03-21 10:30:21 +05:30 committed by Mark Tolmacs
parent c22bec6485
commit c0d48a6b9d
8 changed files with 18 additions and 10 deletions

View file

@ -36,6 +36,7 @@ import {
preventUnload,
resolvablePromise,
isRunningInIframe,
isDevEnv,
} from "@excalidraw/excalidraw/utils";
import {
GithubIcon,
@ -383,7 +384,7 @@ const ExcalidrawWrapper = () => {
const [, forceRefresh] = useState(false);
useEffect(() => {
if (import.meta.env.DEV) {
if (isDevEnv()) {
const debugState = loadSavedDebugState();
if (debugState.enabled && !window.visualDebug) {