diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 98d700e0a0..b9d0843635 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -299,11 +299,11 @@ module.exports = React.createClass({ throw err; } }); + } else if (room) { + // Stop peeking because we have joined this room previously + MatrixClientPeg.get().stopPeeking(); + this.setState({isPeeking: false}); } - } else if (room) { - // Stop peeking because we have joined this room previously - MatrixClientPeg.get().stopPeeking(); - this.setState({isPeeking: false}); } },