Replace Promise.delay with promise utils sleep

This commit is contained in:
Michael Telatynski 2019-11-12 11:46:58 +00:00
parent 6850c14739
commit 0a21957b2c
4 changed files with 13 additions and 9 deletions

View file

@ -32,6 +32,7 @@ import * as Email from '../../../email';
import IdentityAuthClient from '../../../IdentityAuthClient';
import { getDefaultIdentityServerUrl, useDefaultIdentityServer } from '../../../utils/IdentityServerUtils';
import { abbreviateUrl } from '../../../utils/UrlUtils';
import {sleep} from "../../../utils/promise";
const TRUNCATE_QUERY_LIST = 40;
const QUERY_USER_DIRECTORY_DEBOUNCE_MS = 200;
@ -533,7 +534,7 @@ module.exports = createReactClass({
};
// wait a bit to let the user finish typing
await Promise.delay(500);
await sleep(500);
if (cancelled) return null;
try {