From 3cf1b9144d95fa5986180cd08991bd83d3dce3bf Mon Sep 17 00:00:00 2001 From: denshooter Date: Mon, 16 Feb 2026 01:01:27 +0100 Subject: [PATCH] fix: resolve rich text rendering and data mapping issues Hardened rich text conversion logic to handle malformed Tiptap documents and added null checks for CMS data in About section. --- app/components/About.tsx | 6 +- lib/richtext.ts | 133 ++++++++++++++++++++++----------------- 2 files changed, 80 insertions(+), 59 deletions(-) diff --git a/app/components/About.tsx b/app/components/About.tsx index bd86353..e608fbe 100644 --- a/app/components/About.tsx +++ b/app/components/About.tsx @@ -118,8 +118,8 @@ const About = () => { description="Tools & Technologies" header={
- {techStack.length > 0 ? ( - techStack.flatMap(cat => cat.items.map((item: any) => ( + {techStack && techStack.length > 0 ? ( + techStack.flatMap(cat => cat.items?.map((item: any) => ( { description="Beyond the screen" header={
- {hobbies.length > 0 ? hobbies.map((hobby, i) => { + {hobbies && hobbies.length > 0 ? hobbies.map((hobby, i) => { const Icon = iconMap[hobby.icon] || Lightbulb; return (