fix: use the audit placeholder for missing values
This commit is contained in:
1 parent
32a0cf6801
commit
0c2e3561d6
1 file changed
+2
-2
+2
-2
@@ -35,7 +35,7 @@ function flatten(value, prefix, out) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function show(value) {
|
function show(value) {
|
||||||
if (value === undefined) return "—";
|
if (value === undefined) return "(none)";
|
||||||
if (typeof value === "string" && value !== "") {
|
if (typeof value === "string" && value !== "") {
|
||||||
return value.replaceAll("\r", "\\r").replaceAll("\n", "\\n").replaceAll("\t", "\\t");
|
return value.replaceAll("\r", "\\r").replaceAll("\n", "\\n").replaceAll("\t", "\\t");
|
||||||
}
|
}
|
||||||
@@ -157,7 +157,7 @@ function diffCell(row, side) {
|
|||||||
const parts = row.fields.filter((field) => field[side] !== undefined);
|
const parts = row.fields.filter((field) => field[side] !== undefined);
|
||||||
return h("td", null,
|
return h("td", null,
|
||||||
h("div", { class: "diff-content", tabindex: "0", role: "group", "aria-label": side === "before" ? "Before content" : "After content" },
|
h("div", { class: "diff-content", tabindex: "0", role: "group", "aria-label": side === "before" ? "Before content" : "After content" },
|
||||||
parts.length ? parts.map((field) => diffValue(field[side], field.kind, side, labels.get(field.path) ?? field.path)) : "—"));
|
parts.length ? parts.map((field) => diffValue(field[side], field.kind, side, labels.get(field.path) ?? field.path)) : show(undefined)));
|
||||||
}
|
}
|
||||||
|
|
||||||
function diffTable(entry) {
|
function diffTable(entry) {
|
||||||
|
|||||||
Reference in new issue
Block a user