Skip to content

fix: prevent invalid splice when removing override configuration#308854

Open
Akash504-ai wants to merge 1 commit intomicrosoft:mainfrom
Akash504-ai:fix/remove-override-splice-bug
Open

fix: prevent invalid splice when removing override configuration#308854
Akash504-ai wants to merge 1 commit intomicrosoft:mainfrom
Akash504-ai:fix/remove-override-splice-bug

Conversation

@Akash504-ai
Copy link
Copy Markdown

Fixes an issue in removeValue where Array.splice could be called with an invalid index when removing override configurations.

Previously, if the override was not found, findIndex returned -1, which could unintentionally remove the last element of the overrides array.

This change adds a check to ensure the override exists before removing it.

How to test

  • Call removeValue with a key that has no matching override
  • Ensure no unintended override entries are removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants