diff --git a/src/pages/oper-log/index.tsx b/src/pages/oper-log/index.tsx index 4ba66a0..c88050a 100644 --- a/src/pages/oper-log/index.tsx +++ b/src/pages/oper-log/index.tsx @@ -50,11 +50,11 @@ const OperLog: React.FC = () => { }, 'rule insert': (item) => { const operParam = parseOperParam(item); - return `Add Rule: '${ruleBaseMeta[operParam.type].title || '-'}'`; + return `Add Rule: '${ruleBaseMeta[operParam?.type]?.title || '-'}'`; }, 'rule update': (item) => { const operParam = parseOperParam(item); - return `Update Rule: '${ruleBaseMeta[operParam.type].title || '-'}'`; + return `Update Rule: '${ruleBaseMeta[operParam?.type]?.title || '-'}'`; }, 'rule update status': (item) => { const matched = item.operParam.match(/status=(?\d+)/); @@ -124,7 +124,7 @@ const OperLog: React.FC = () => { hideInSearch: true, ellipsis: true, width: 'auto', - renderText: (_, item) => actionMap[item.title]?.(item) || '-', + renderText: (_, item) => actionMap[item?.title]?.(item) || '-', }, { title: $t('table.ipAddress'),