File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed
Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -253,21 +253,17 @@ function normalizeProps (options: Object) {
253253 */
254254function normalizeInject ( options : Object ) {
255255 const inject = options . inject
256- if ( ! inject ) return
257- let res = { }
258- let i , val
259- if ( Array . isArray ( inject ) ) {
260- i = inject . length
261- while ( i -- ) {
262- val = inject [ i ]
263- if ( typeof val === 'string' ) {
264- res [ val ] = val
265- } else if ( process . env . NODE_ENV !== 'production' ) {
266- warn ( 'inject must be strings when using array syntax.' )
267- }
256+ if ( ! Array . isArray ( inject ) ) return
257+ const res = { }
258+ let i = inject . length
259+ let val
260+ while ( i -- ) {
261+ val = inject [ i ]
262+ if ( typeof val === 'string' ) {
263+ res [ val ] = val
264+ } else if ( process . env . NODE_ENV !== 'production' ) {
265+ warn ( 'inject must be strings when using array syntax.' )
268266 }
269- } else if ( isPlainObject ( inject ) ) {
270- res = options . inject
271267 }
272268 options . inject = res
273269}
You can’t perform that action at this time.
0 commit comments