(vm)
| 2432 | } |
| 2433 | |
| 2434 | function initInjections (vm) { |
| 2435 | var result = resolveInject(vm.$options.inject, vm); |
| 2436 | if (result) { |
| 2437 | toggleObserving(false); |
| 2438 | Object.keys(result).forEach(function (key) { |
| 2439 | /* istanbul ignore else */ |
| 2440 | { |
| 2441 | defineReactive$$1(vm, key, result[key], function () { |
| 2442 | warn( |
| 2443 | "Avoid mutating an injected value directly since the changes will be " + |
| 2444 | "overwritten whenever the provided component re-renders. " + |
| 2445 | "injection being mutated: \"" + key + "\"", |
| 2446 | vm |
| 2447 | ); |
| 2448 | }); |
| 2449 | } |
| 2450 | }); |
| 2451 | toggleObserving(true); |
| 2452 | } |
| 2453 | } |
| 2454 | |
| 2455 | function resolveInject (inject, vm) { |
| 2456 | if (inject) { |
no test coverage detected