Refine use cases rule examples
This commit is contained in:
1 parent
7c46cbd87b
commit
2f2b5d0dc2
65 files changed
+3129
-252
No files matched your search
@@ -352,5 +352,13 @@ export function parseDocumentSectionsForDisplay(
|
||||
if (!document || typeof document !== "object") return [];
|
||||
const sections = (document as Record<string, unknown>).sections;
|
||||
if (!Array.isArray(sections)) return [];
|
||||
return sections.filter(isDocumentSection);
|
||||
return sections
|
||||
.filter(isDocumentSection)
|
||||
.map((section) => ({
|
||||
...section,
|
||||
entries: section.entries.map((entry) => ({
|
||||
...entry,
|
||||
body: typeof entry.body === "string" ? entry.body : "",
|
||||
})),
|
||||
}));
|
||||
}
|
||||
Reference in new issue
Block a user