Split up CSS; use .catch instead of .then
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
078ee54edf
commit
2d153a72c1
4 changed files with 69 additions and 52 deletions
|
@ -135,7 +135,7 @@ module.exports = React.createClass({
|
|||
|
||||
onPinClick: function() {
|
||||
MatrixClientPeg.get().getStateEvent(this.props.mxEvent.getRoomId(), 'm.room.pinned_events', '')
|
||||
.then(null, e => {
|
||||
.catch(e => {
|
||||
// Intercept the Event Not Found error and fall through the promise chain with no event.
|
||||
if (e.errcode === "M_NOT_FOUND") return null;
|
||||
throw e;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue