Skip to content

Commit fdc8313

Browse files
authored
Merge pull request #3872 from ninja-inc/bug/solve-react-warning
adding a key prop to solve React.js warning
2 parents 76617a5 + d063987 commit fdc8313

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugins/topbar/topbar.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react"
1+
import React, { cloneElement } from "react"
22
import PropTypes from "prop-types"
33

44
//import "./topbar.less"
@@ -134,7 +134,7 @@ export default class Topbar extends React.Component {
134134
<span>swagger</span>
135135
</Link>
136136
<form className="download-url-wrapper" onSubmit={formOnSubmit}>
137-
{control}
137+
{control.map((el, i) => cloneElement(el, { key: i }))}
138138
</form>
139139
</div>
140140
</div>

0 commit comments

Comments
 (0)