mirror of
https://github.com/mupen64plus-ae/acra-storage.git
synced 2024-11-26 23:10:41 +00:00
Fix #3: be more tolerant if BUILD field is missing.
This commit is contained in:
parent
b09e9f21a8
commit
05e48ce94f
21
vendor/acra-storage/utils.js
vendored
21
vendor/acra-storage/utils.js
vendored
@ -24,10 +24,25 @@ var utils = {
|
||||
},
|
||||
|
||||
getDevice: function(doc) {
|
||||
if(doc.BUILD.MANUFACTURER) {
|
||||
return doc.BUILD.MANUFACTURER + " " + doc.BUILD.BRAND + " " + doc.BUILD.MODEL;
|
||||
if(doc.BUILD) {
|
||||
if(doc.BUILD.MANUFACTURER) {
|
||||
return doc.BUILD.MANUFACTURER + " " + doc.BUILD.BRAND + " " + doc.BUILD.MODEL;
|
||||
} else {
|
||||
return doc.BUILD.BRAND + " " + doc.BUILD.MODEL;
|
||||
}
|
||||
} else {
|
||||
return doc.BUILD.BRAND + " " + doc.BUILD.MODEL;
|
||||
var value = "";
|
||||
if(doc.BRAND) {
|
||||
value = doc.BRAND;
|
||||
}
|
||||
if(doc.PRODUCT) {
|
||||
value += " " + doc.PRODUCT;
|
||||
}
|
||||
if(doc.PHONE_MODEL) {
|
||||
value += " " + doc.MODEL;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user