forked from matrix/element-web
make eslint happy
This commit is contained in:
parent
9ab30b7b17
commit
1b004f170d
|
@ -204,15 +204,16 @@ class RoomStateExplorer extends React.Component {
|
||||||
if (this.state.eventType === null) {
|
if (this.state.eventType === null) {
|
||||||
Object.keys(roomStateEvents).forEach((evType) => {
|
Object.keys(roomStateEvents).forEach((evType) => {
|
||||||
const stateGroup = roomStateEvents[evType];
|
const stateGroup = roomStateEvents[evType];
|
||||||
const keys = Object.keys(stateGroup);
|
const stateKeys = Object.keys(stateGroup);
|
||||||
|
|
||||||
if (keys.length > 1) {
|
let onClickFn;
|
||||||
rows.push(<button key={evType} onClick={this.browseEventType(evType)}>{evType}</button>);
|
if (stateKeys.length > 1) {
|
||||||
} else if (keys.length === 1) {
|
onClickFn = this.browseEventType(evType);
|
||||||
rows.push(
|
} else if (stateKeys.length === 1) {
|
||||||
<button key={evType} onClick={this.onViewSourceClick(stateGroup[keys[0]])}>{evType}</button>
|
onClickFn = this.onViewSourceClick(stateGroup[stateKeys[0]]);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rows.push(<button key={evType} onClick={onClickFn}>{ evType }</button>);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const evType = this.state.eventType;
|
const evType = this.state.eventType;
|
||||||
|
|
Loading…
Reference in New Issue