From eb5c8fac1bdaa54bb8673e9c2a57ae185d767d36 Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Thu, 4 Jun 2026 08:37:59 -0700 Subject: [PATCH] fix(ui): null in JSON array crashes ComplexLogItem (#4780) Co-authored-by: Claude Opus 4.8 (1M context) --- assets/components/LogViewer/ComplexLogItem.spec.ts | 5 +++++ assets/components/LogViewer/ComplexLogItem.vue | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/components/LogViewer/ComplexLogItem.spec.ts b/assets/components/LogViewer/ComplexLogItem.spec.ts index fd01578b..fcbcb202 100644 --- a/assets/components/LogViewer/ComplexLogItem.spec.ts +++ b/assets/components/LogViewer/ComplexLogItem.spec.ts @@ -53,6 +53,11 @@ describe("", () => { expect(wrapper.find(".array").text()).toContain("b"); }); + test("renders null inside an array without throwing", () => { + const wrapper = mountItem({ tags: ["a", null, "b"] } as any); + expect(wrapper.find(".array").text()).toContain("null"); + }); + test("shows a placeholder when every value is hidden", () => { const visibleKeys = ref(new Map([[["a"], false]])); const wrapper = mountItem({ a: 1 }, visibleKeys); diff --git a/assets/components/LogViewer/ComplexLogItem.vue b/assets/components/LogViewer/ComplexLogItem.vue index e0c9c763..525afcbe 100644 --- a/assets/components/LogViewer/ComplexLogItem.vue +++ b/assets/components/LogViewer/ComplexLogItem.vue @@ -15,7 +15,7 @@ class="after:text-base-content/70 not-last:after:content-[',']" > - +