Skip to content

Commit

Permalink
fix(subtitle): use finally instead of then
Browse files Browse the repository at this point in the history
  • Loading branch information
YvonTre committed Jul 16, 2019
1 parent 8a11c23 commit 23d2c5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/renderer/store/modules/SubtitleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ const actions = {
}),
new Promise((resolve, reject) => setTimeout(() => reject('timeout'), 10000)),
])
.then(() => {
.catch(console.error)
.finally(() => {
commit(m.setIsRefreshing, false);
dispatch(legacyActions.UPDATE_SUBTITLE_TYPE, true);
dispatch(a.stopAISelection);
})
.catch(console.error);
});
}

if (hasStoredSubtitles && preference) await dispatch(a.addDatabaseSubtitles, {
Expand Down

0 comments on commit 23d2c5a

Please sign in to comment.