Skip to content

Commit

Permalink
Merge pull request #8241 from vector-im/dbkr/fix_platform_name
Browse files Browse the repository at this point in the history
Fix device names on desktop
  • Loading branch information
dbkr authored Jan 23, 2019
2 parents 9aa8b32 + 9aad704 commit 0022834
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/vector/platform/ElectronPlatform.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ const ipcRenderer = window.ipcRenderer;

function platformFriendlyName(): string {
// used to use window.process but the same info is available here
if (navigator.userAgent.indexOf('Macintosh')) {
if (navigator.userAgent.includes('Macintosh')) {
return 'macOS';
} else if (navigator.userAgent.indexOf('FreeBSD')) {
} else if (navigator.userAgent.includes('FreeBSD')) {
return 'FreeBSD';
} else if (navigator.userAgent.indexOf('OpenBSD')) {
} else if (navigator.userAgent.includes('OpenBSD')) {
return 'OpenBSD';
} else if (navigator.userAgent.indexOf('SunOS')) {
} else if (navigator.userAgent.includes('SunOS')) {
return 'SunOS';
} else if (navigator.userAgent.indexOf('Windows')) {
} else if (navigator.userAgent.includes('Windows')) {
return 'Windows';
} else if (navigator.userAgent.indexOf('Linux')) {
} else if (navigator.userAgent.includes('Linux')) {
return 'Linux';
} else {
return 'Unknown';
Expand Down

0 comments on commit 0022834

Please sign in to comment.