Skip to content

Commit 82b9b2e

Browse files
authored
Fix for type other on UA (#1173)
* This is needed for the icon vs. larger if unknown. Test case missed. * Optimized a bit on redundancy Post fix for #764 Auto-merge
1 parent 3c7f8ed commit 82b9b2e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libs/modelParser.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,9 @@ var parseComment = function (aComment) {
674674
comment.ua.raw = comment.userAgent;
675675
ua = useragent.parse(comment.userAgent).family.toLowerCase().replace(/\s+/g, '-');
676676
if (ua !== 'other') {
677-
comment.ua.class = 'fa-lg ua-' + useragent.parse(comment.userAgent).family.toLowerCase()
678-
.replace(/\s+/g, '-')
677+
comment.ua.class = 'fa-lg ua-' + ua;
678+
} else if (comment.userAgent) {
679+
comment.ua.class = 'fa-lg ua-' + ua;
679680
}
680681

681682
// Dates

0 commit comments

Comments
 (0)