Skip to content

base: add bounds check in getGridNode for invalid location index#308741

Open
Akash504-ai wants to merge 1 commit intomicrosoft:mainfrom
Akash504-ai:fix/grid-invalid-location-check
Open

base: add bounds check in getGridNode for invalid location index#308741
Akash504-ai wants to merge 1 commit intomicrosoft:mainfrom
Akash504-ai:fix/grid-invalid-location-check

Conversation

@Akash504-ai
Copy link
Copy Markdown

PR description

Adds a defensive bounds check when traversing grid nodes.

Previously, getGridNode assumed that the provided location index is always valid. This change guards against invalid indices, preventing potential runtime errors when accessing node.children[index]. This does not change existing behavior but improves robustness.

@vs-code-engineering
Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@joaomoreno

Matched files:

  • src/vs/base/browser/ui/grid/grid.ts

@benibenj

Matched files:

  • src/vs/base/browser/ui/grid/grid.ts

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