Fix: process.env may not exist #61

Closed
yunyuyuan wants to merge 1 commit from patch-1 into main
yunyuyuan commented 2022-05-04 09:52:30 +02:00 (Migrated from github.com)

Sometimes process != 'undefined' but process.env == undefined,in a framework Nuxt3. Like this:

image

Error:
image

Anyhow,maybe we should check whether env exists in this place.

Sometimes `process != 'undefined'` but `process.env == undefined`,in a framework [Nuxt3](https://v3.nuxtjs.org/). Like this: ![image](https://user-images.githubusercontent.com/45785585/166640979-8caec153-5047-4829-b7e5-4d1a4090efa4.png) Error: ![image](https://user-images.githubusercontent.com/45785585/166641661-ae985aca-fc8f-42fb-abf1-1369af5874b8.png) Anyhow,maybe we should check whether `env` exists in this place.
marijnh commented 2022-05-04 10:52:43 +02:00 (Migrated from github.com)

With this patch it'll still crash if process is not defined at all. I've pushed an alternative patch that should handle that too.

With this patch it'll still crash if `process` is not defined at all. I've pushed an alternative patch that should handle that too.
yunyuyuan commented 2022-05-04 12:24:28 +02:00 (Migrated from github.com)

With this patch it'll still crash if process is not defined at all. I've pushed an alternative patch that should handle that too.

Thinks! I made a mistake with typescript.

> With this patch it'll still crash if `process` is not defined at all. I've pushed an alternative patch that should handle that too. Thinks! I made a mistake with typescript.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/lr!61
No description provided.