Replace rest of defer usages using small shim. Add homebrew promise utils
This commit is contained in:
parent
44401d73b4
commit
6850c14739
4 changed files with 53 additions and 4 deletions
|
@ -24,6 +24,7 @@ import sdk from './index';
|
|||
import dis from './dispatcher';
|
||||
import { _t } from './languageHandler';
|
||||
import Promise from "bluebird";
|
||||
import {defer} from "./utils/promise";
|
||||
|
||||
const DIALOG_CONTAINER_ID = "mx_Dialog_Container";
|
||||
const STATIC_DIALOG_CONTAINER_ID = "mx_Dialog_StaticContainer";
|
||||
|
@ -202,7 +203,7 @@ class ModalManager {
|
|||
}
|
||||
|
||||
_getCloseFn(modal, props) {
|
||||
const deferred = Promise.defer();
|
||||
const deferred = defer();
|
||||
return [(...args) => {
|
||||
deferred.resolve(args);
|
||||
if (props && props.onFinished) props.onFinished.apply(null, args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue