Only make recursive table on non-null objects

main
Chandler Swift 2024-03-15 00:07:37 -05:00
parent 6e6a7b207e
commit 4ac53a4733
Signed by: chandlerswift
GPG Key ID: A851D929D52FB93F
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ function objectToTable(o) {
// TODO: hack hack hack
let table = `<table style="margin: 0.5em; border-collapse: collapse;">`;
for (let [key, value] of Object.entries(o)) {
if (typeof value === "object") {
if (typeof value === "object" && value !== null) {
value = objectToTable(value);
}
if (typeof value === "string" && /^https?:\/\//.test(value)) {