wait-for: add some delay between each loop
This commit is contained in:
@@ -3,6 +3,6 @@ import type { MaybePromise } from "./types.js"
|
||||
|
||||
export async function waitFor(condition: () => MaybePromise<boolean>) {
|
||||
while (!(await condition())) {
|
||||
await setTimeout()
|
||||
await setTimeout(100)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user