Skip to content

Commit

Permalink
fix(helper): Ensure browser detection is handled in the unkown case
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Jun 19, 2015
1 parent 1997ee5 commit 9328f67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/helper.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 9328f67

Please sign in to comment.