make eslint happy

This commit is contained in:
Michael Telatynski 2017-08-03 01:10:32 +01:00
parent 9ab30b7b17
commit 1b004f170d
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with 8 additions and 7 deletions

View File

@ -204,15 +204,16 @@ class RoomStateExplorer extends React.Component {
if (this.state.eventType === null) {
Object.keys(roomStateEvents).forEach((evType) => {
const stateGroup = roomStateEvents[evType];
const keys = Object.keys(stateGroup);
const stateKeys = Object.keys(stateGroup);
if (keys.length > 1) {
rows.push(<button key={evType} onClick={this.browseEventType(evType)}>{evType}</button>);
} else if (keys.length === 1) {
rows.push(
<button key={evType} onClick={this.onViewSourceClick(stateGroup[keys[0]])}>{evType}</button>
);
let onClickFn;
if (stateKeys.length > 1) {
onClickFn = this.browseEventType(evType);
} else if (stateKeys.length === 1) {
onClickFn = this.onViewSourceClick(stateGroup[stateKeys[0]]);
}
rows.push(<button key={evType} onClick={onClickFn}>{ evType }</button>);
});
} else {
const evType = this.state.eventType;