From e2a0472ffc8a6afe298647c4aa12f7f78a58de86 Mon Sep 17 00:00:00 2001 From: Jordi Enric Date: Fri, 10 Apr 2026 12:23:12 +0200 Subject: [PATCH] fix(design-system): guard missing registry components Co-Authored-By: Claude Opus 4.6 Made-with: Cursor --- apps/design-system/lib/rehype-component.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/design-system/lib/rehype-component.ts b/apps/design-system/lib/rehype-component.ts index e1307f7ac9c..8ae7fdef416 100644 --- a/apps/design-system/lib/rehype-component.ts +++ b/apps/design-system/lib/rehype-component.ts @@ -55,6 +55,9 @@ export function rehypeComponent() { src = srcPath } else { const component = Index[style.name][name] + if (!component) { + continue + } // console.log('got to ELSE STATEMENT') // console.log('filename', fileName) // console.log('name', name) @@ -124,6 +127,9 @@ export function rehypeComponent() { try { for (const style of styles) { const component = Index[style.name][name] + if (!component) { + continue + } // console.log('GOT HERE') const src = component.files[0] @@ -176,6 +182,9 @@ export function rehypeComponent() { try { for (const style of styles) { const component = Index[style.name][name] + if (!component) { + continue + } // console.log('GOT HERE') const src = component.files[0]