Skip to content

Commit

Permalink
Fix warning when only text is filled
Browse files Browse the repository at this point in the history
  • Loading branch information
xrutayisire committed Sep 7, 2024
1 parent d73bfef commit f3b01bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/react-server/PrismicLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ export const PrismicLink = React.forwardRef(function PrismicLink<
)}`,
);
} else if (
Object.keys(field).length > 1 &&
("text" in field
? Object.keys(field).length > 2
: Object.keys(field).length > 1) &&
!("url" in field || "uid" in field || "id" in field)
) {
console.warn(
Expand Down

0 comments on commit f3b01bf

Please sign in to comment.