Skip to content

Commit b63e0a0

Browse files
authored
fix: handle process.env being undefined while process is not
closes #3579
1 parent 2051100 commit b63e0a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/shared/shared.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ const KNOWN_EXTENSIONS = new Set()
184184
export function treatAsHtml(filename: string): boolean {
185185
if (KNOWN_EXTENSIONS.size === 0) {
186186
const extraExts =
187-
(typeof process === 'object' && process.env.VITE_EXTRA_EXTENSIONS) ||
187+
(typeof process === 'object' && process.env?.VITE_EXTRA_EXTENSIONS) ||
188188
(import.meta as any).env?.VITE_EXTRA_EXTENSIONS ||
189189
''
190190

0 commit comments

Comments
 (0)