Skip to content

Commit 436e660

Browse files
committed
Avoid duplicate react keys in board select dialog
Signed-off-by: jbicker <jan.bicker@typefox.io>
1 parent 17fab65 commit 436e660

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arduino-ide-extension/src/browser/boards/select-board-dialog-widget.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export class BoardAndPortSelectionList extends React.Component<BoardAndPortSelec
6262

6363
render(): React.ReactNode {
6464
return <div className={`${this.props.type} list`}>
65-
{this.props.list.map(item => <BoardAndPortSelectableItem
66-
key={item.board ? item.board.name : item.port}
65+
{this.props.list.map((item, idx) => <BoardAndPortSelectableItem
66+
key={(item.board ? item.board.name : item.port || '') + idx}
6767
onSelect={this.doSelect}
6868
item={item}
6969
selected={this.isSelectedItem(item)}

0 commit comments

Comments
 (0)