From 53ae42ed6808060ac957864a2860156802e945fd Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 19 Jul 2017 14:11:22 +0100 Subject: [PATCH] Use `catch` instead of `fail` to handle room tag error Because bluebird doesn't support fail --- src/components/views/rooms/DNDRoomTile.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/views/rooms/DNDRoomTile.js b/src/components/views/rooms/DNDRoomTile.js index 7857da9d..2f521028 100644 --- a/src/components/views/rooms/DNDRoomTile.js +++ b/src/components/views/rooms/DNDRoomTile.js @@ -130,10 +130,7 @@ var roomTileSource = { if (newTag && newTag !== 'im.vector.fake.direct' && (item.targetList !== item.originalList || newOrder) ) { - //component.state.set({ spinner: component.state.spinner ? component.state.spinner++ : 1 }); - MatrixClientPeg.get().setRoomTag(item.room.roomId, newTag, newOrder).finally(function() { - //component.state.set({ spinner: component.state.spinner-- }); - }).fail(function(err) { + MatrixClientPeg.get().setRoomTag(item.room.roomId, newTag, newOrder).catch(function(err) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to add tag " + newTag + " to room: " + err); Modal.createDialog(ErrorDialog, {