From bc57944e50a7aea94b81eed1497fd887e40c4ad6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 05:51:41 +0000 Subject: [PATCH 1/2] Initial plan From b249732cd5539e236e6528245e10b5515547688a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 05:54:39 +0000 Subject: [PATCH 2/2] Fix safeAccess to handle list object fields in view columns and sorting Agent-Logs-Url: https://github.com/queenvictoria/pages-cms/sessions/39856835-841f-4119-adbb-60b363b48d32 Co-authored-by: queenvictoria <694770+queenvictoria@users.noreply.github.com> --- lib/schema.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/schema.ts b/lib/schema.ts index a4584c2ad..ab74966c5 100644 --- a/lib/schema.ts +++ b/lib/schema.ts @@ -317,6 +317,10 @@ function safeAccess(obj: Record, path: string) { if (Number.isNaN(parsedIndex)) return undefined; return arrayValue[parsedIndex]; } + // If current value is an array and we're accessing a named property, use the first element + if (Array.isArray(acc)) { + return acc[0]?.[part]; + } return acc && acc[part]; }, obj); }