Parcourir la source

fix(nova): null value processing

Casper Dai il y a 2 ans
Parent
commit
dcc2c6cad4
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/utils/adapter/nova.js

+ 1 - 1
src/utils/adapter/nova.js

@@ -77,7 +77,7 @@ export function parseCachePower ({ switchStatus, typeArray = '[]' }) {
         connectIndex: 0,
         portIndex: 0,
         powerIndex: index,
-        type: typeArray[index],
+        type: typeArray?.[index] || '未知',
         action: Number(val)
       }
     })