From 9328f67e20e4874b6b7cc9b9551cdf4725ce0620 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Fri, 19 Jun 2015 23:24:33 +0200 Subject: [PATCH] fix(helper): Ensure browser detection is handled in the unkown case --- lib/helper.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/helper.js b/lib/helper.js index 80cbd5557..f414dceef 100644 --- a/lib/helper.js +++ b/lib/helper.js @@ -6,7 +6,8 @@ var Promise = require('bluebird') exports.browserFullNameToShort = function (fullName) { var agent = useragent.parse(fullName) - return agent.family !== 'Other' ? agent.toAgent() + ' (' + agent.os + ')' : fullName + var isKnown = agent.family !== 'Other' && agent.os.family !== 'Other' + return isKnown ? agent.toAgent() + ' (' + agent.os + ')' : fullName } exports.isDefined = function (value) {