Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
fix(server): fix undefined dereference
Browse files Browse the repository at this point in the history
#6086
r=shane-tomlinson
  • Loading branch information
philbooth committed Apr 20, 2018
1 parent 75d4e3e commit dc6e30b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/lib/user-agent.js
Expand Up @@ -34,7 +34,7 @@ function safeFamily (parent) {
}

function safeVersion (parent) {
if (! VALID_VERSION.test(parent.toVersionString())) {
if (parent && parent.toVersionString && ! VALID_VERSION.test(parent.toVersionString())) {
parent.major = parent.minor = parent.patch = parent.patchMinor = null;
}
}
Expand Down

0 comments on commit dc6e30b

Please sign in to comment.