We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 574162e commit 01db8feCopy full SHA for 01db8fe
src/core/instance/inject.js
@@ -38,18 +38,14 @@ export function initInjections (vm: Component) {
38
export function resolveInject (inject: any, vm: Component): ?Object {
39
if (inject) {
40
// inject is :any because flow is not smart enough to figure out cached
41
- // isArray here
42
- const isArray = Array.isArray(inject)
43
const result = Object.create(null)
44
- const keys = isArray
45
- ? inject
46
- : hasSymbol
+ const keys = hasSymbol
47
? Reflect.ownKeys(inject)
48
: Object.keys(inject)
49
50
for (let i = 0; i < keys.length; i++) {
51
const key = keys[i]
52
- const provideKey = isArray ? key : inject[key]
+ const provideKey = inject[key]
53
let source = vm
54
while (source) {
55
if (source._provided && provideKey in source._provided) {
0 commit comments