From 07c12341d7f2e25e41a56ea0d5e38e9a374ae84b Mon Sep 17 00:00:00 2001 From: Abdelrahman Awad Date: Sun, 2 May 2021 00:40:16 +0200 Subject: [PATCH] fix: priotrize self injections over parent injections closes #3270 --- packages/vee-validate/src/utils/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vee-validate/src/utils/common.ts b/packages/vee-validate/src/utils/common.ts index 2aafcc322..eb36eb7f4 100644 --- a/packages/vee-validate/src/utils/common.ts +++ b/packages/vee-validate/src/utils/common.ts @@ -134,7 +134,7 @@ export function keysOf>(record: TRecord) export function injectWithSelf(symbol: InjectionKey, def: T | undefined = undefined): T | undefined { const vm = getCurrentInstance() as any; - return inject(symbol, vm?.provides[symbol as any] || def); + return vm?.provides[symbol as any] || inject(symbol, def); } export function warn(message: string) {