Skip to content

Commit

Permalink
fix: priotrize self injections over parent injections closes #3270
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed May 1, 2021
1 parent 85d4e14 commit 07c1234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vee-validate/src/utils/common.ts
Expand Up @@ -134,7 +134,7 @@ export function keysOf<TRecord extends Record<string, unknown>>(record: TRecord)
export function injectWithSelf<T>(symbol: InjectionKey<T>, 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) {
Expand Down

0 comments on commit 07c1234

Please sign in to comment.