-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Toggle on/off rules from the notch #5158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for continuedev canceled.
|
|
@sestinj could update description/title/etc, looks like this PR adds ability to turn rules on/off for chat/agent? |
|
@sestinj looks like non-flaky failing tests and merge conflicts |
|
|
| let startIndex = 0; | ||
| while ((startIndex = nodeTextValue.indexOf(query, startIndex)) !== -1) { | ||
| while ( | ||
| (startIndex = nodeTextValue?.indexOf(query, startIndex) ?? -1) !== -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar null reference safety issue in the search loop. The original code assumed nodeTextValue would never be null when calling indexOf, which could throw a TypeError. The fix adds both optional chaining (?.) and nullish coalescing (??) to safely handle null/undefined cases by defaulting to -1, which properly terminates the loop.
React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)
|
😱 Found 1 issue. Time to roll up your sleeves! 😱 |
Built on top of 5104