From e0ddd88ec94f64962954bed618f35e1b14bab8d9 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 7 Nov 2017 11:14:27 -0700 Subject: [PATCH] Default to no read pins if there is no applicable account data Signed-off-by: Travis Ralston --- src/components/views/rooms/PinnedEventsPanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/PinnedEventsPanel.js b/src/components/views/rooms/PinnedEventsPanel.js index 1e6de43ab5..a8fb35fcd5 100644 --- a/src/components/views/rooms/PinnedEventsPanel.js +++ b/src/components/views/rooms/PinnedEventsPanel.js @@ -75,7 +75,7 @@ module.exports = React.createClass({ const pinnedEvents = this.props.room.currentState.getStateEvents("m.room.pinned_events", ""); if (!pinnedEvents) return; // nothing to read - let readStateEvents = null; + let readStateEvents = []; const readPinsEvent = this.props.room.getAccountData("im.vector.room.read_pins"); if (readPinsEvent && readPinsEvent.getContent()) { readStateEvents = readPinsEvent.getContent().event_ids || [];