diff --git a/src/index.ts b/src/index.ts index a833188..8e2bddf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,7 @@ export function getUserAgent(): string { return navigator.userAgent; } - if (typeof process === "object" && "version" in process) { + if (typeof process === "object" && process.version !== undefined) { return `Node.js/${process.version.substr(1)} (${process.platform}; ${ process.arch })`;