Skip to content

Commit

Permalink
#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 4118e58
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/happy-dom/src/window/Window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@ export default class Window extends EventTarget implements IWindow {
enableFileSystemHttpRequests: false,
navigator: {
userAgent: `Mozilla/5.0 (X11; ${
process.platform.charAt(0).toUpperCase() + process.platform.slice(1) + ' ' + process.arch
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 4118e58

Please sign in to comment.