Fix JSON parsing error when record.other is empty string

This commit is contained in:
Lilo
2025-01-09 16:46:16 +08:00
parent a335d9e1f4
commit 37226d6589

View File

@@ -236,7 +236,12 @@ const LogsTable = () => {
</>
);
} else {
let other = JSON.parse(record.other);
let other = null;
try {
other = JSON.parse(record.other);
} catch (e) {
console.error(`Failed to parse record.other: "${record.other}".`, e);
}
if (other === null) {
return <></>;
}