Add ! to chomp in result prefix
What does this MR do and why?
Doing result[:prefix]&.chomp || prefix
did not work as expected when result[:prefix]
was a blank string. Ideally we would want to attach the prefix
that is defined before this call to be used when .chomp
returns empty string. So by using .chomp!
, we get nil
when the string is empty, hence we now attach prefix
that is defined separately.
I discovered this while working on !132209 (merged) that is still a WIP.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vitali Tatarintev