Skip to content

Commit 1ac90dc

Browse files
committed
update caf and update usage
1 parent d074c55 commit 1ac90dc

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"homepage": "https://vue-concurrency.netlify.app/",
4141
"license": "MIT",
4242
"dependencies": {
43-
"caf": "13.1.1"
43+
"caf": "15.0.1"
4444
},
4545
"devDependencies": {
4646
"@testing-library/dom": "^7.24.3",

src/TaskInstance.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import {
66
onFulfilled,
77
onRejected,
88
} from "./types/index";
9-
10-
// https://github.com/MartinMalinda/vue-concurrency/issues/58
11-
const CAF = require('caf/caf');
9+
import CAF from 'caf';
1210

1311
export type TaskInstanceStatus =
1412
| "running"
@@ -180,7 +178,7 @@ function runTaskInstance<T>(
180178
options: TaskInstanceOptions
181179
): void {
182180
const token = new (CAF as any).cancelToken();
183-
const cancelable = (CAF as any)(cb, token);
181+
const cancelable = (CAF as any)(cb);
184182
taskInstance.token = token;
185183

186184
taskInstance.hasStarted = true;

0 commit comments

Comments
 (0)