MCPcopy
hub / github.com/fanmingming/live / initInjections

Function initInjections

m3u8/vue.js:2434–2453  ·  view source on GitHub ↗
(vm)

Source from the content-addressed store, hash-verified

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) {

Callers 1

initMixinFunction · 0.85

Calls 4

resolveInjectFunction · 0.85
toggleObservingFunction · 0.85
defineReactive$$1Function · 0.85
warnFunction · 0.85

Tested by

no test coverage detected