Fix JSON parsing error when record.other is empty string
This commit is contained in:
@@ -236,7 +236,12 @@ const LogsTable = () => {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
} else {
|
} 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) {
|
if (other === null) {
|
||||||
return <></>;
|
return <></>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user