diff --git a/.changeset/olive-lemons-marry.md b/.changeset/olive-lemons-marry.md new file mode 100644 index 00000000000..e178e0b3401 --- /dev/null +++ b/.changeset/olive-lemons-marry.md @@ -0,0 +1,5 @@ +--- +"@remix-run/react": patch +--- + +Use unique key for `script:ld+json` meta descriptors diff --git a/contributors.yml b/contributors.yml index 62d50ee7fd1..91a7e07bbdd 100644 --- a/contributors.yml +++ b/contributors.yml @@ -533,6 +533,7 @@ - vorcigernix - wangbinyq - weavdale +- wilcoschoneveld - willhack - willin - wizardlyhel diff --git a/packages/remix-react/components.tsx b/packages/remix-react/components.tsx index 50f39d1a153..4b79348dad3 100644 --- a/packages/remix-react/components.tsx +++ b/packages/remix-react/components.tsx @@ -606,21 +606,18 @@ export function Meta() { } if ("script:ld+json" in metaProps) { - let json: string | null = null; try { - json = JSON.stringify(metaProps["script:ld+json"]); - } catch (err) {} - return ( - json != null && ( + let json = JSON.stringify(metaProps["script:ld+json"]); + return (