also give empty tiles a key

pull/21833/head
Bruno Windels 2018-11-22 10:18:11 +00:00
parent cf0f75cad4
commit 36decaf70b
1 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ export default class RoomGridView extends React.Component {
roomStores = roomStores.concat(emptyTiles);
}
return (<main className="mx_GroupGridView">
{ roomStores.map((roomStore) => {
{ roomStores.map((roomStore, i) => {
if (roomStore) {
const isActive = roomStore === this.state.currentRoomStore;
const tileClasses = classNames({
@ -83,7 +83,7 @@ export default class RoomGridView extends React.Component {
/>
</section>);
} else {
return (<section className={"mx_GroupGridView_emptyTile"} />);
return (<section className={"mx_GroupGridView_emptyTile"} key={`empty-${i}`} />);
}
}) }
</main>);