Skip to content

Commit f14e7f1

Browse files
committed
dont use parent scope
1 parent a1451f0 commit f14e7f1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Task.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
dropEnqueued,
1616
} from "./utils/general";
1717
import { Resolved, TaskCb } from "./types/index";
18-
import { getCurrentScope } from "vue";
1918

2019
export type Task<T, U extends any[]> = {
2120
// Lifecycle state
@@ -65,8 +64,7 @@ export default function useTask<T, U extends any[]>(
6564
cb: TaskCb<T, U>,
6665
options = { cancelOnUnmount: true }
6766
): Task<Resolved<T>, U> {
68-
const parentScope = getCurrentScope();
69-
const scope = parentScope || effectScope();
67+
const scope = effectScope();
7068
const content = _reactiveContent({
7169
_isRestartable: false,
7270
_isDropping: false,

0 commit comments

Comments
 (0)