Skip to content

Allow empty labels array to be pushed to set-labels to remove all of them#4637

Merged
alexr00 merged 1 commit intomicrosoft:mainfrom
Balastrong:fix/remove-last-label
Mar 17, 2023
Merged

Allow empty labels array to be pushed to set-labels to remove all of them#4637
alexr00 merged 1 commit intomicrosoft:mainfrom
Balastrong:fix/remove-last-label

Conversation

@Balastrong
Copy link
Contributor

This PR fixes #4634

If there are no checked labels from the quick pick menu, the command set-labelsis not posted, preventing the possibility to remove all (the last one) selected labels.
I didn’t remove the if because labelsToAdd can be undefined if the menu is closed with esc, but the length control is causing the bug hence should be removed.

@alexr00 alexr00 added this to the March 2023 milestone Mar 17, 2023
@alexr00 alexr00 enabled auto-merge (squash) March 17, 2023 08:57
Copy link
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@alexr00 alexr00 merged commit 922df3d into microsoft:main Mar 17, 2023
@Balastrong Balastrong deleted the fix/remove-last-label branch March 17, 2023 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot remove the last label

3 participants