Skip to content

Commit

Permalink
avoid key conflict (#58249)
Browse files Browse the repository at this point in the history
### What?

gives all elements in the array unique keys

should fix #57709 and fix #57743
  • Loading branch information
sokra authored Nov 9, 2023
1 parent e2f3059 commit a628e63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/server/app-render/get-layer-assets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function getLayerAssets({
? scriptTags.map((href, index) => {
const fullSrc = `${ctx.assetPrefix}/_next/${href}`

return <script src={fullSrc} async={true} key={index} />
return <script src={fullSrc} async={true} key={`script-${index}`} />
})
: []

Expand Down

0 comments on commit a628e63

Please sign in to comment.