Skip to content

Commit

Permalink
fix(getNodeVersion): Safety check before accessing process.versions(#88)
Browse files Browse the repository at this point in the history
Fixes #82 (partially)
  • Loading branch information
phoebeschmidt authored Apr 3, 2020
1 parent 67b54ed commit 4aa1f2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export function isNode () {
}

export function getNodeVersion () {
return process.versions.node ? `v${process.versions.node}` : process.version
return process.versions && process.versions.node ? `v${process.versions.node}` : process.version
}

0 comments on commit 4aa1f2e

Please sign in to comment.