Commit 4829e27a authored by Reuben Pereira's avatar Reuben Pereira

Revert "Merge branch '341121-fix-sidebar-labels-bug' into 'master'"

This reverts merge request !72111
parent a9dbb0ab
...@@ -69,8 +69,7 @@ export default { ...@@ -69,8 +69,7 @@ export default {
if (isScopedLabel(candidateLabel)) { if (isScopedLabel(candidateLabel)) {
const scopedKeyWithDelimiter = `${scopedLabelKey(candidateLabel)}${SCOPED_LABEL_DELIMITER}`; const scopedKeyWithDelimiter = `${scopedLabelKey(candidateLabel)}${SCOPED_LABEL_DELIMITER}`;
const currentActiveScopedLabel = state.labels.find( const currentActiveScopedLabel = state.labels.find(
({ set, title }) => ({ title }) => title.startsWith(scopedKeyWithDelimiter) && title !== candidateLabel.title,
set && title.startsWith(scopedKeyWithDelimiter) && title !== candidateLabel.title,
); );
if (currentActiveScopedLabel) { if (currentActiveScopedLabel) {
......
...@@ -159,9 +159,8 @@ describe('LabelsSelect Mutations', () => { ...@@ -159,9 +159,8 @@ describe('LabelsSelect Mutations', () => {
labels = [ labels = [
{ id: 1, title: 'scoped' }, { id: 1, title: 'scoped' },
{ id: 2, title: 'scoped::one', set: false }, { id: 2, title: 'scoped::one', set: false },
{ id: 3, title: 'scoped::two', set: false }, { id: 3, title: 'scoped::test', set: true },
{ id: 4, title: 'scoped::three', set: true }, { id: 4, title: '' },
{ id: 5, title: '' },
]; ];
}); });
...@@ -192,9 +191,8 @@ describe('LabelsSelect Mutations', () => { ...@@ -192,9 +191,8 @@ describe('LabelsSelect Mutations', () => {
expect(state.labels).toEqual([ expect(state.labels).toEqual([
{ id: 1, title: 'scoped' }, { id: 1, title: 'scoped' },
{ id: 2, title: 'scoped::one', set: true, touched: true }, { id: 2, title: 'scoped::one', set: true, touched: true },
{ id: 3, title: 'scoped::two', set: false }, { id: 3, title: 'scoped::test', set: false },
{ id: 4, title: 'scoped::three', set: false }, { id: 4, title: '' },
{ id: 5, title: '' },
]); ]);
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment