소스 검색

fix(nova): null value processing

Casper Dai 2 년 전
부모
커밋
dcc2c6cad4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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)
       }
     })