Skip to content

Commit 37bd5e3

Browse files
committed
fix: Change to typeof process !== 'undefined'.
1 parent 9b039c5 commit 37bd5e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function setLanguage({ lang, messages }: LanguageInterface): string {
138138
* It resolves the language file or data, from direct data, require or Promise.
139139
*/
140140
async function resolveLang(callable: Function, lang: string): Promise<LanguageJsonFileInterface> {
141-
const hasPhpTranslations = process && process.env ? process.env.LARAVEL_VUE_I18N_HAS_PHP : false;
141+
const hasPhpTranslations = typeof process !== 'undefined' && process.env ? process.env.LARAVEL_VUE_I18N_HAS_PHP : false;
142142
const data = callable(lang)
143143

144144
if (data instanceof Promise) {

0 commit comments

Comments
 (0)