Closed vaurdan closed 1 month ago
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
The #2654 PR introduced a bug where, even though the API would return valid Smart Links, the UI would throw a "No smart links were generated." error.
This was due to how React handles store variables. Even though
processSmartLinks
updates thesmartLinks
variable in the Smart Linking store, thesmartLinks
variable would be empty/outdated when we check its length (if (smartLinks.length === 0)
).This PR addresses this issue by returning the processed smart links from the
processSmartLinks
function and using that returned value to determine if an error should be outputted.Motivation and context
Fix bug that prevents the proper usage of the Smart Linking feature
How has this been tested?
Tested manually with different mocked-up API responses.
Summary by CodeRabbit
New Features
Improvements