]> cat aescling's git repositories - mastodon.git/commit
Add missing rejection handling for Promises (#7008)
authorunarist <m.unarist@gmail.com>
Mon, 2 Apr 2018 12:51:02 +0000 (21:51 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 2 Apr 2018 12:51:02 +0000 (14:51 +0200)
commit2c51bc0ca5a4c3a4bb140b4b40dabdda859ebb94
treedfc6ec5791ab17992f6940da330b3b7193f80ec4
parente7a17167015dca6864f31152c47334c3b3a857a2
 Add missing rejection handling for Promises (#7008)

* Add eslint-plugin-promise to detect uncaught rejections

* Move alert generation for errors to actions/alert

* Add missing rejection handling for Promises

* Use catch() instead of onReject on then()

Then it will catches rejection from onFulfilled. This detection can be
disabled by `allowThen` option, though.
13 files changed:
.eslintrc.yml
app/javascript/mastodon/actions/accounts.js
app/javascript/mastodon/actions/alerts.js
app/javascript/mastodon/actions/compose.js
app/javascript/mastodon/actions/lists.js
app/javascript/mastodon/actions/push_notifications/registerer.js
app/javascript/mastodon/actions/settings.js
app/javascript/mastodon/containers/status_container.js
app/javascript/mastodon/features/ui/components/embed_modal.js
app/javascript/mastodon/middleware/errors.js
app/javascript/mastodon/storage/modifier.js
package.json
yarn.lock