diff --git a/src/core/instance/inject.js b/src/core/instance/inject.js index a2954163140..373827b28af 100644 --- a/src/core/instance/inject.js +++ b/src/core/instance/inject.js @@ -34,9 +34,9 @@ export function initInjections (vm: Component) { if (process.env.NODE_ENV !== 'production') { defineReactive(vm, key, source._provided[provideKey], () => { warn( - `Avoid mutating a injections directly since the value will be ` + + `Avoid mutating an injected value directly since the changes will be ` + `overwritten whenever the provided component re-renders. ` + - `injections being mutated: "${key}"`, + `injection being mutated: "${key}"`, vm ) }) diff --git a/test/unit/features/options/inject.spec.js b/test/unit/features/options/inject.spec.js index bfb5e5bd143..2949e43c750 100644 --- a/test/unit/features/options/inject.spec.js +++ b/test/unit/features/options/inject.spec.js @@ -213,8 +213,8 @@ describe('Options provide/inject', () => { expect(child.foo).toBe(1) child.foo = 2 expect( - `Avoid mutating a injections directly since the value will be ` + + `Avoid mutating an injected value directly since the changes will be ` + `overwritten whenever the provided component re-renders. ` + - `injections being mutated: "${key}"`).toHaveBeenWarned() + `injection being mutated: "${key}"`).toHaveBeenWarned() }) })