Skip to content

Commit 4048386

Browse files
committed
fix: make sure it validates if the typeof the env var exists.
1 parent f6f04f4 commit 4048386

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/has-php-translations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ function checkProcessEnv(): boolean {
88

99
function checkImportMeta(): boolean {
1010
/** @ts-ignore */
11-
return import.meta.env.VITE_LARAVEL_VUE_I18N_HAS_PHP ? true : false
11+
return typeof import.meta.env.VITE_LARAVEL_VUE_I18N_HAS_PHP !== 'undefined' && import.meta.env.VITE_LARAVEL_VUE_I18N_HAS_PHP ? true : false
1212
}

0 commit comments

Comments
 (0)