From 1b004f170dce0de49d55fa05de9a3a3e84b0b0f4 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Aug 2017 01:10:32 +0100
Subject: [PATCH] make eslint happy
---
src/components/views/dialogs/DevtoolsDialog.js | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js
index 9ef71c3b..32cf0c0c 100644
--- a/src/components/views/dialogs/DevtoolsDialog.js
+++ b/src/components/views/dialogs/DevtoolsDialog.js
@@ -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();
- } else if (keys.length === 1) {
- rows.push(
-
- );
+ let onClickFn;
+ if (stateKeys.length > 1) {
+ onClickFn = this.browseEventType(evType);
+ } else if (stateKeys.length === 1) {
+ onClickFn = this.onViewSourceClick(stateGroup[stateKeys[0]]);
}
+
+ rows.push();
});
} else {
const evType = this.state.eventType;