-
Notifications
You must be signed in to change notification settings - Fork 258
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 select issues #11869
Fix select issues #11869
Conversation
addObject(this.authConfig.allowedPrincipalIds, id); | ||
const currentIds = this.authConfig.allowedPrincipalIds; | ||
// add new id and remove duplicates | ||
const updatedIds = [...new Set([...currentIds, id])]; |
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.
I like it, It's elegant. Does Set preserve order?
We do use lodash though so I think we want to use https://lodash.com/docs/3.10.1#uniq. Notice they also have the unique() alias in case you'd want to use that.
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.
@codyrancher yes Set preserves order, but as you pointed out, I should've used lodash one, thanks!
Summary
Fixes: Epic => #11743
Linked issues => #11752 #11753 #11754 #11755 #11756
Occurred changes and/or fixed issues
Technical notes summary
Areas or cases that should be tested
Areas which could experience regressions
Screenshot/Video
11752:
11752.mov
11753:
11753.mov
11754:
11754.mov
11755 & 11756:
11755-6.mov
Checklist