code cleanup
This commit is contained in:
+2
-2
@@ -757,7 +757,7 @@ function decodePiCpuinfo(lines) {
|
||||
const serial = getValue(lines, 'serial', ':', true);
|
||||
|
||||
let result = {};
|
||||
if (oldRevisionCodes.hasOwnProperty(revisionCode)) {
|
||||
if ({}.hasOwnProperty.call(oldRevisionCodes, revisionCode)) {
|
||||
// old revision codes
|
||||
result = {
|
||||
model,
|
||||
@@ -787,7 +787,7 @@ function decodePiCpuinfo(lines) {
|
||||
memory: 256 * Math.pow(2, memSizeCode),
|
||||
manufacturer,
|
||||
processor,
|
||||
type: typeList.hasOwnProperty(typeCode) ? typeList[typeCode] : '',
|
||||
type: {}.hasOwnProperty.call(typeList, typeCode) ? typeList[typeCode] : '',
|
||||
revision: '1.' + revision.substr(7, 1),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user