We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
typeof process !== 'undefined'
1 parent 9b039c5 commit 37bd5e3Copy full SHA for 37bd5e3
src/index.ts
@@ -138,7 +138,7 @@ function setLanguage({ lang, messages }: LanguageInterface): string {
138
* It resolves the language file or data, from direct data, require or Promise.
139
*/
140
async function resolveLang(callable: Function, lang: string): Promise<LanguageJsonFileInterface> {
141
- const hasPhpTranslations = process && process.env ? process.env.LARAVEL_VUE_I18N_HAS_PHP : false;
+ const hasPhpTranslations = typeof process !== 'undefined' && process.env ? process.env.LARAVEL_VUE_I18N_HAS_PHP : false;
142
const data = callable(lang)
143
144
if (data instanceof Promise) {
0 commit comments