Skip to content

Commit a628e63

Browse files
authored
avoid key conflict (#58249)
### What? gives all elements in the array unique keys should fix #57709 and fix #57743
1 parent e2f3059 commit a628e63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/next/src/server/app-render/get-layer-assets.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export function getLayerAssets({
9797
? scriptTags.map((href, index) => {
9898
const fullSrc = `${ctx.assetPrefix}/_next/${href}`
9999

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

0 commit comments

Comments
 (0)