Uh oh!
There was an error while loading. Please reload this page.
Fix bug in PACKAGE.md examples - #7561
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a null reference exception (NRE) bug in the PACKAGE.md code examples. The examples were attempting to call .Substring() on a potentially null processedText variable. The fix updates the code to use the original source string for substring operations and renames the variable to normalizedText to better reflect its purpose.
Key Changes:
- Fixed NRE by using
sourceinstead ofnormalizedTextin.Substring()calls - Renamed
processedTexttonormalizedTextfor better clarity and API consistency
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tarekgh
left a comment
There was a problem hiding this comment.
Thanks @adamsitnik for fixing this!
Uh oh!
There was an error while loading. Please reload this page.
I tried to use the code from the README.md to prepare for a demo I am doing tomorrow and I got NRE. We should be using
sourcerather thanprocessedTextand I think it's better to renameprocessedTexttonormalizedTextto express what it is.cc @luisquintanilla@tarekgh