Skip to content

Commit 29f265d

Browse files
committed
refactor
1 parent f229397 commit 29f265d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/instance/inject.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { hasSymbol } from 'core/util/env'
44
import { warn } from '../util/index'
55
import { defineReactive } from '../observer/index'
6-
import { hasOwn } from '../../shared/util'
6+
import { hasOwn } from 'shared/util'
77

88
export function initProvide (vm: Component) {
99
const provide = vm.$options.provide
@@ -58,8 +58,9 @@ export function resolveInject (inject: any, vm: Component): ?Object {
5858
}
5959
source = source.$parent
6060
}
61-
process.env.NODE_ENV !== 'production' && !hasOwn(result, key) &&
61+
if (process.env.NODE_ENV !== 'production' && !hasOwn(result, key)) {
6262
warn(`Injection "${key}" not found`, vm)
63+
}
6364
}
6465
return result
6566
}

0 commit comments

Comments
 (0)