Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Add diagnostic log to catch events without an ID
Browse files Browse the repository at this point in the history
This adds some temporary logging to investigate
element-hq/element-web#11120.
  • Loading branch information
jryans committed Oct 29, 2019
1 parent 54cea6a commit 3775dc0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/views/rooms/EventTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ module.exports = createReactClass({
return null;
}
const eventId = this.props.mxEvent.getId();
if (!eventId) {
// XXX: Temporary diagnostic logging for https://github.com/vector-im/riot-web/issues/11120
console.error("EventTile attempted to get relations for an event without an ID");
// Use event's special `toJSON` method to log key data.
console.log(JSON.stringify(this.props.mxEvent, null, 4));
}
return this.props.getRelationsForEvent(eventId, "m.annotation", "m.reaction");
},

Expand Down

0 comments on commit 3775dc0

Please sign in to comment.