-
Notifications
You must be signed in to change notification settings - Fork 429
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
feat: Add default rule for segments #4095
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
@kyle-ssg I think E2E is legitimately broken here. |
Ah, yep I bet I adjusted tests when I originally removed this |
@rolodato could you re-test this since it now also fixes the linked buggy segment rules |
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.
Works great thanks! Left a minor comment, don't even take the time to reply if it doesn't apply :D
@@ -319,49 +319,51 @@ const CreateSegment: FC<CreateSegmentType> = ({ | |||
}, [operators, rules]) | |||
//Find any non-deleted rules | |||
const hasNoRules = !rules[0]?.rules?.find((v) => !v.delete) | |||
|
|||
const rulesToShow = rules[0].rules.filter((v) => !v.delete) |
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.
Feel free to ignore this if I'm wrong - it just caught my attention that we're guarding against rules[0]
being undefined or null on the line above, but not this one.
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
Adds placeholder rule for segments
How did you test this code?
Click create segment