Prevent "undefined" OS version in session list

This commit is contained in:
dgw 2018-04-08 05:28:49 -05:00
parent d28a9a9253
commit da23d42692

View File

@ -316,7 +316,11 @@ Client.prototype.updateSession = function(token, ip, request) {
}
if (agent.os.name) {
friendlyAgent += ` on ${agent.os.name} ${agent.os.version}`;
friendlyAgent += ` on ${agent.os.name}`;
if (agent.os.version) {
friendlyAgent += ` ${agent.os.version}`;
}
}
client.config.sessions[token] = _.assign(client.config.sessions[token], {