Skip to content

Commit a35d1da

Browse files
committed
refactor: style
1 parent 7177cf3 commit a35d1da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/runtime-core/src/apiCreateApp.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,11 @@ export function createAppAPI<HostElement>(
350350
},
351351

352352
inject<T>(key: InjectionKey<T> | string) {
353-
const value = context.provides[key as string]
354-
if (__DEV__ && !((key as string) in context.provides)) {
353+
if ((key as string) in context.provides) {
354+
return context.provides[key as string]
355+
} else if (__DEV__) {
355356
warn(`injection "${String(key)}" not found.`)
356357
}
357-
return value
358358
}
359359
})
360360

0 commit comments

Comments
 (0)