resolve the issue , It would allow you to fetch components in a case-… #9299
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…insensitive manner
1.The function now accepts a caseInsensitiveName parameter for the component name to be retrieved in a case-insensitive manner.
2.Inside the function, it converts caseInsensitiveName to lowercase using .toLowerCase() before attempting to retrieve the component.
3.This ensures that component names are treated as case-insensitive during retrieval
Description
when you call getComponent("wonderBAR"), it will correctly retrieve the component named "wONderBAR" because it converts the provided caseInsensitiveName to lowercase before looking up the component in the system.components object. This makes the component retrieval case-insensitive, and it matches the expected behavior you described.
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests