fix: 修复追溯码面板 outboundTarget 为空时 getOutImages 空指针导致列表崩溃

This commit is contained in:
Nixevol
2026-07-10 17:38:40 +08:00
parent 0d650c993e
commit f364d2d194
+3 -2
View File
@@ -322,7 +322,8 @@ const outboundForm = reactive<any>({
});
function rowIsOutbound(row: any) {
return Boolean(row?.outTime || getOutImages(row).length);
if (!row) return false;
return Boolean(row.outTime || getOutImages(row).length);
}
function rowIsOnchain(row: any) {
return Boolean(row?.latestProof);
@@ -810,7 +811,7 @@ function fileName(key: string) {
}
function getOutImages(row: any) {
const list = Array.isArray(row.outImages) ? row.outImages : [];
const list = Array.isArray(row?.outImages) ? row.outImages : [];
return list.map((item: any) =>
typeof item === 'string' ? { key: item, url: item, name: fileName(item), type: 'image' } : item,
);