Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(mdx): ensure proper type casting in Proxy get handler
  • Loading branch information
arghyaxcodes committed Apr 21, 2026
commit d4f4d0fe47bffcd214a60cd9ff10e642a4635541
4 changes: 2 additions & 2 deletions src/mdx-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {
return new Proxy(merged, {
get: (target, prop: string) => {
if (typeof prop !== "string") return undefined;
if (prop in target) return target[prop];
if (prop in target) return (target as any)[prop];
if (prop.endsWith("Icon")) {
const baseName = prop.slice(0, -4);
return target[baseName];
return (target as any)[baseName];
}
return undefined;
},
Expand Down
Loading