code cleanup

This commit is contained in:
Sebastian Hildebrandt
2020-12-08 12:42:35 +01:00
parent bda9fba255
commit 4f98f2ff20
2 changed files with 15 additions and 2 deletions
+2 -2
View File
@@ -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),
}
}