Skip to content

Commit

Permalink
capricorn86#1158@patch: Ignore absent process.plattform entry.
Browse files Browse the repository at this point in the history
  • Loading branch information
mash-graz committed Nov 24, 2023
1 parent c741829 commit 55b8d52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/happy-dom/src/window/Window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ export default class Window extends EventTarget implements IWindow {
disableErrorCapturing: false,
enableFileSystemHttpRequests: false,
navigator: {
userAgent: `Mozilla/5.0 (X11; ${
process.platform.charAt(0).toUpperCase() + process.platform.slice(1) + ' ' + process.arch
userAgent: `Mozilla/5.0 (X11; ${(process?.platform) ?
process.platform.charAt(0).toUpperCase() + process.platform.slice(1) + ' ' + process.arch : 'Unknown'
}) AppleWebKit/537.36 (KHTML, like Gecko) HappyDOM/${PackageVersion.version}`
},
device: {
Expand Down

0 comments on commit 55b8d52

Please sign in to comment.