Skip to content

Commit 73bbd53

Browse files
fix
1 parent 1bf1bba commit 73bbd53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wait-for.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ function waitFor(
3737
},
3838
},
3939
) {
40-
if (typeof callback !== 'function') {
40+
if (typeof originalCallback !== 'function') {
4141
throw new TypeError('Received `callback` arg must be a function')
4242
}
4343

4444
// callback will be replaced by a noop function as soon as it finishes
4545
// to prevent callback leaking calls
46-
let callback = originalCallback;
46+
let callback = originalCallback
4747

4848
return new Promise(async (resolve, reject) => {
4949
let lastError, intervalId, observer
@@ -111,7 +111,7 @@ function waitFor(
111111

112112
function onDone(error, result) {
113113
finished = true
114-
callback = () => {};
114+
callback = () => {}
115115
clearTimeout(overallTimeoutTimer)
116116

117117
if (!usingJestFakeTimers) {

0 commit comments

Comments
 (0)