Stop peeking if anything went wrong, not just explicit failure
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
f1032bb115
commit
df7f1b46bf
1 changed files with 5 additions and 1 deletions
|
@ -276,6 +276,11 @@ module.exports = React.createClass({
|
||||||
});
|
});
|
||||||
this._onRoomLoaded(room);
|
this._onRoomLoaded(room);
|
||||||
}, (err) => {
|
}, (err) => {
|
||||||
|
// Stop peeking if anything went wrong
|
||||||
|
this.setState({
|
||||||
|
isPeeking: false,
|
||||||
|
});
|
||||||
|
|
||||||
// This won't necessarily be a MatrixError, but we duck-type
|
// This won't necessarily be a MatrixError, but we duck-type
|
||||||
// here and say if it's got an 'errcode' key with the right value,
|
// here and say if it's got an 'errcode' key with the right value,
|
||||||
// it means we can't peek.
|
// it means we can't peek.
|
||||||
|
@ -283,7 +288,6 @@ module.exports = React.createClass({
|
||||||
// This is fine: the room just isn't peekable (we assume).
|
// This is fine: the room just isn't peekable (we assume).
|
||||||
this.setState({
|
this.setState({
|
||||||
peekLoading: false,
|
peekLoading: false,
|
||||||
isPeeking: false,
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
throw err;
|
throw err;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue