mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 07:05:05 -04:00
Handle undefined device names - simplify + minor fix
This commit is contained in:
parent
4b15aa0417
commit
fad4632eb9
1 changed files with 7 additions and 9 deletions
|
@ -214,16 +214,14 @@ class Peer {
|
|||
deviceName = ua.os.name.replace('Mac OS', 'Mac') + ' ';
|
||||
}
|
||||
|
||||
if(ua.device){
|
||||
if (ua.device.model) {
|
||||
deviceName += ua.device.model;
|
||||
} else {
|
||||
deviceName += ua.browser.name;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(!deviceName)
|
||||
deviceName = 'Unknown Device';
|
||||
}
|
||||
|
||||
const displayName = uniqueNamesGenerator({
|
||||
length: 2,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue