microsoft / microsoft/reflect-metadata

Wrong cached provider returned

Open
#162 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.4k
Forks
190
Avg merge
13h 52m
Merged PRs (30d)
1

Description

Check getProviderNoCache fn's return value for second cached provider match
It should likely return the second cached provider, not the first one.
if (second.isProviderFor(O, P)) return first; -> if (second.isProviderFor(O, P)) return second;

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the getProviderNoCache function and inspect the branch handling the second cached provider match. Confirm that this path returns the second provider rather than the first, and verify the behavior with a regression test covering two matching cached providers.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.