Skip to content

Commit 9328f67

Browse files
fix(helper): Ensure browser detection is handled in the unkown case
1 parent 1997ee5 commit 9328f67

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/helper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ var Promise = require('bluebird')
66

77
exports.browserFullNameToShort = function (fullName) {
88
var agent = useragent.parse(fullName)
9-
return agent.family !== 'Other' ? agent.toAgent() + ' (' + agent.os + ')' : fullName
9+
var isKnown = agent.family !== 'Other' && agent.os.family !== 'Other'
10+
return isKnown ? agent.toAgent() + ' (' + agent.os + ')' : fullName
1011
}
1112

1213
exports.isDefined = function (value) {

0 commit comments

Comments
 (0)