convert helper function to native js

This commit is contained in:
Laila Los
2022-12-08 14:07:01 +01:00
parent 3e4411b8f5
commit c0908f2ee4
+7 -1
View File
@@ -146,7 +146,13 @@ export const showAll = (vm) => {
// waits n milliseconds and then promise resolves
// usage: await wait(500);
export const wait = (n) => timer(n).pipe(take(1)).toPromise();
export const wait = (n) => {
return new Promise((resolve) => {
setTimeout(() => {
resolve();
}, n);
});
};
// Gets a localVue with custom directives
export function getLocalVue(instrumentLocalization = false) {