Make if clearer

pull/21833/head
David Baker 2018-07-05 19:46:37 +01:00
parent fb7ce9dd7f
commit 7e2b559ccd
1 changed files with 3 additions and 6 deletions

View File

@ -51,12 +51,9 @@ class WidgetEchoStore extends EventEmitter {
for (const w of currentRoomWidgets) { for (const w of currentRoomWidgets) {
const widgetId = w.getStateKey(); const widgetId = w.getStateKey();
if (roomEchoState[widgetId] && Object.keys(roomEchoState[widgetId]).length === 0) { // If there's no echo, or the echo still has a widget present, show the *old* widget
// delete locally so don't copy it // we don't include widgets that have changed for the same rason we don't include new ones
// we don't include widgets that have changed for the same rason we don't include new ones, if (!roomEchoState[widgetId] || Object.keys(roomEchoState[widgetId]).length !== 0) {
// so fall into the 'else' case and use the old one
//} else if (roomEchoState && roomEchoState[widgetId]) {
// echoedWidgets.push(roomEchoState[widgetId]);
} else { } else {
echoedWidgets.push(w); echoedWidgets.push(w);
} }