From 0acba737d28d03f8ac7fdf8821c2bdb4427ea840 Mon Sep 17 00:00:00 2001 From: HaNdTriX Date: Fri, 17 Aug 2018 20:28:48 +0200 Subject: [PATCH] Fix server key warning (#4973) The current canary version shows the following warning in development mode: ```log Warning: Each child in an array or iterator should have a unique "key" prop. See https://fb.me/react-warning-keys for more information. in script in NextScript in body in html in Document ``` This PR adds proper keys to the devFiles on the server. Related https://github.com/zeit/next.js/pull/4954 --- server/document.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/document.js b/server/document.js index 7e1dcf3487331..0f74b1c77cf9d 100644 --- a/server/document.js +++ b/server/document.js @@ -204,7 +204,7 @@ export class NextScript extends Component { const pagePathname = getPagePathname(pathname) return - {devFiles ? devFiles.map((file) =>