Skip to content

Commit c423a43

Browse files
committed
refactor: replace getCurrentInstance with currentInstance in useHost function
1 parent cf93845 commit c423a43

File tree

2 files changed

+413
-400
lines changed

2 files changed

+413
-400
lines changed

packages/runtime-dom/src/apiCustomElement.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import {
2626
type VNode,
2727
type VNodeProps,
2828
createVNode,
29+
currentInstance,
2930
defineComponent,
30-
getCurrentInstance,
3131
nextTick,
3232
unref,
3333
warn,
@@ -793,7 +793,7 @@ export class VueElement extends VueElementBase<
793793
}
794794

795795
export function useHost(caller?: string): VueElementBase | null {
796-
const instance = getCurrentInstance()
796+
const instance = currentInstance
797797
const el = instance && (instance.ce as VueElementBase)
798798
if (el) {
799799
return el

0 commit comments

Comments
 (0)