Revert "s/.done(/.then(/ since modern es6 track unhandled promise exceptions"
This reverts commit 09a8fec2
This commit is contained in:
parent
09a8fec261
commit
168b1b68bb
43 changed files with 72 additions and 74 deletions
|
@ -205,7 +205,7 @@ export default class AppTile extends React.Component {
|
|||
if (!this._scalarClient) {
|
||||
this._scalarClient = defaultManager.getScalarClient();
|
||||
}
|
||||
this._scalarClient.getScalarToken().then((token) => {
|
||||
this._scalarClient.getScalarToken().done((token) => {
|
||||
// Append scalar_token as a query param if not already present
|
||||
this._scalarClient.scalarToken = token;
|
||||
const u = url.parse(this._addWurlParams(this.props.url));
|
||||
|
|
|
@ -51,7 +51,7 @@ export default class EditableTextContainer extends React.Component {
|
|||
|
||||
this.setState({busy: true});
|
||||
|
||||
this.props.getInitialValue().then(
|
||||
this.props.getInitialValue().done(
|
||||
(result) => {
|
||||
if (this._unmounted) { return; }
|
||||
this.setState({
|
||||
|
@ -83,7 +83,7 @@ export default class EditableTextContainer extends React.Component {
|
|||
errorString: null,
|
||||
});
|
||||
|
||||
this.props.onSubmit(value).then(
|
||||
this.props.onSubmit(value).done(
|
||||
() => {
|
||||
if (this._unmounted) { return; }
|
||||
this.setState({
|
||||
|
|
|
@ -54,7 +54,7 @@ export default class ErrorBoundary extends React.PureComponent {
|
|||
if (!PlatformPeg.get()) return;
|
||||
|
||||
MatrixClientPeg.get().stopClient();
|
||||
MatrixClientPeg.get().store.deleteAllData().then(() => {
|
||||
MatrixClientPeg.get().store.deleteAllData().done(() => {
|
||||
PlatformPeg.get().reload();
|
||||
});
|
||||
};
|
||||
|
|
|
@ -84,7 +84,7 @@ export default class ImageView extends React.Component {
|
|||
title: _t('Error'),
|
||||
description: _t('You cannot delete this image. (%(code)s)', {code: code}),
|
||||
});
|
||||
}).then();
|
||||
}).done();
|
||||
},
|
||||
});
|
||||
};
|
||||
|
|
|
@ -49,7 +49,7 @@ export default class LanguageDropdown extends React.Component {
|
|||
this.setState({langs});
|
||||
}).catch(() => {
|
||||
this.setState({langs: ['en']});
|
||||
}).then();
|
||||
}).done();
|
||||
|
||||
if (!this.props.value) {
|
||||
// If no value is given, we start with the first
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue