Skip to content

Commit 70fd6c0

Browse files
author
tony
committed
remove optional chain
1 parent bd19967 commit 70fd6c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runtime-core/src/apiInject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function inject(
5151
// fallback to appContext's `provides` if the instance is at root
5252
const provides =
5353
instance.parent == null
54-
? instance.vnode.appContext?.provides
54+
? instance.vnode.appContext && instance.vnode.appContext.provides
5555
: instance.parent.provides
5656

5757
if (provides && (key as string | symbol) in provides) {

0 commit comments

Comments
 (0)