Repository navigation
Fix duplicated condition in accessibility signal property change detection - #303604
Merged
Megan Rogge (meganrogge) merged 1 commit intoNov 5, 2026
Conversation
…ction The condition checked lastValueAtPosition twice instead of also checking lastValueOnLine. This meant on the first autorun call, if lastValueAtPosition happened to be set but lastValueOnLine was still undefined, the signal triggers could fire prematurely.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an initialization guard in the accessibility signal change-detection autorun within the editor text property signals contribution, ensuring both cached values are checked before firing transition-based signals.
Changes:
- Corrected the guard condition to check
lastValueOnLine !== undefined(instead of checkinglastValueAtPositiontwice), preventinglastValueOnLinefrom being treated as initialized when it isn’t.
Megan Rogge (meganrogge)
approved these changes
Nov 3, 2026
Megan Rogge (meganrogge)
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the fix!
Megan Rogge (meganrogge)
enabled auto-merge (squash)
November 3, 2026 19:51
Dmitriy Vasyura (dmitrivMS)
approved these changes
Nov 3, 2026
Dmitriy Vasyura (dmitrivMS)
approved these changes
Nov 3, 2026
TylerLeonhardt
approved these changes
Nov 3, 2026
Dmitriy Vasyura (dmitrivMS)
approved these changes
Nov 5, 2026
Megan Rogge (meganrogge)
merged commit Nov 5, 2026
85ee95e
into
microsoft:main
62 of 64 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #303602
The condition on line 152 checked
lastValueAtPosition !== undefinedtwice instead of also checkinglastValueOnLine !== undefined. This guard is meant to skip the initialautoruncall when both values are stillundefined. Because only one variable was checked, the guard did not properly protect againstlastValueOnLinebeingundefined.Before:
if (lastValueAtPosition !== undefined && lastValueAtPosition !== undefined)After:
if (lastValueAtPosition !== undefined && lastValueOnLine !== undefined)