From 9d3ba2b3d9a9fcc0f8ee1fc222c9da9d26ce3d25 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 11 Feb 2019 14:33:19 +0000 Subject: [PATCH] Guard against invalid room object on join --- src/components/structures/RoomView.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 50fa18e075..f75393c6db 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -877,13 +877,12 @@ module.exports = React.createClass({ // If the user is a ROU, allow them to transition to a PWLU if (cli && cli.isGuest()) { // Join this room once the user has registered and logged in - const signUrl = this.props.thirdPartyInvite ? - this.props.thirdPartyInvite.inviteSignUrl : undefined; + // (If we failed to peek, we may not have a valid room object.) dis.dispatch({ action: 'do_after_sync_prepared', deferred_action: { action: 'view_room', - room_id: this.state.room.roomId, + room_id: this.state.room ? this.state.room.roomId : this.state.roomId, }, });