Skip to content

Commit bf66023

Browse files
committed
v3.0.1
1 parent 5b78ef9 commit bf66023

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

lib/tryCall.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/tryCall.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/tryUntil.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/tryUntil.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tryfunc",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "Calling throwing or failing functions",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",
@@ -30,4 +30,4 @@
3030
"delay.js": ">=1.0.2",
3131
"tslib": ">=1.8.0"
3232
}
33-
}
33+
}

src/tryCall.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default async <ReturnValueType>(
1919
}
2020
for (let i = 0; i < numAttempts; ++i) {
2121
try {
22-
const val = func(i)
22+
const val = await func(i)
2323
if (onAttempt) {
2424
onAttempt(null, i, true)
2525
}

src/tryUntil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default async <ReturnValueType>(
1919
throw new Error('the interval should be a positive finite integer')
2020
}
2121
for (let i = 0; i < numAttempts; ++i) {
22-
const val = func(i)
22+
const val = await func(i)
2323
if (validate(val)) {
2424
if (onAttempt) {
2525
onAttempt(val, i, true)

0 commit comments

Comments
 (0)