X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Froot-helpers%2Futils.ts;h=de4e08bf593f03b8d7e001b420a71c1303b13563;hb=210856a7be4631540791bad027fb3ef0f7a51f14;hp=6df151ad9bc4dfa0b029247397ac549d0dc98da8;hpb=52a350a15c34aa13bffaeedeb39de37cb0534fde;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/root-helpers/utils.ts b/client/src/root-helpers/utils.ts index 6df151ad9..de4e08bf5 100644 --- a/client/src/root-helpers/utils.ts +++ b/client/src/root-helpers/utils.ts @@ -44,7 +44,14 @@ function importModule (path: string) { }) } +function wait (ms: number) { + return new Promise(res => { + setTimeout(() => res(), ms) + }) +} + export { importModule, - objectToUrlEncoded + objectToUrlEncoded, + wait }