Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
change Modal async/await signature to use raw promises
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
  • Loading branch information
t3chguy committed Aug 9, 2019
1 parent 7fe078c commit 49c7730
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class ModalManager {
this._reRender();
return {
close: closeDialog,
then: (resolve, reject) => onFinishedProm.then(resolve, reject),
finished: onFinishedProm,
};
}

Expand All @@ -285,7 +285,7 @@ class ModalManager {
this._reRender();
return {
close: closeDialog,
then: (resolve, reject) => onFinishedProm.then(resolve, reject),
finished: onFinishedProm,
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/MatrixChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ export default React.createClass({
const CreateRoomDialog = sdk.getComponent('dialogs.CreateRoomDialog');
const modal = Modal.createTrackedDialog('Create Room', '', CreateRoomDialog);

const [shouldCreate, name, noFederate] = await modal;
const [shouldCreate, name, noFederate] = await modal.finished;
if (shouldCreate) {
const createOpts = {};
if (name) createOpts.name = name;
Expand Down

0 comments on commit 49c7730

Please sign in to comment.