Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 16551af

Browse files
authored
fix(tryOnMounted): pass target to getLifeCycleTarget (#4685)
1 parent 159175b commit 16551af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/shared/tryOnMounted/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { getLifeCycleTarget } from '../utils'
1111
* @param target
1212
*/
1313
export function tryOnMounted(fn: Fn, sync = true, target?: any) {
14-
const instance = getLifeCycleTarget()
14+
const instance = getLifeCycleTarget(target)
1515
if (instance)
1616
onMounted(fn, target)
1717
else if (sync)

0 commit comments

Comments
 (0)