-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix: allowing spaces in enum IDs #1884
Conversation
Deployed to https://pr-1884.aam-digital.net/ |
@@ -307,7 +307,7 @@ export class QueryService { | |||
key: string, | |||
value: string | |||
): any[] { | |||
const values = value.replace(new RegExp(" ", "g"), "").split("|"); | |||
const values = value.trim().split(/\s*\|\s*/); |
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.
why is the simple .split("|")
not enough here anymore? (maybe add comment to document this even?)
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.
@TheSlimvReal your comment explains the regex (I got that before already) but not why we need a regex and can't just split at any "|" 😉
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.
It's just safeguard so both male|female
as well as male | female
works. Spaces around the |
are ignored allowing people to define the query either way.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
🎉 This PR is included in version 3.21.1-master.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 3.21.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
see issue: #XX
Visible/Frontend Changes
Architectural/Backend Changes