Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0d086448
Commit
0d086448
authored
Aug 04, 2021
by
NataliaTepluhina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced includes with some
parent
fa24a09c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/mutations.js
...d/components/sidebar/labels_select_vue/store/mutations.js
+2
-4
No files found.
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/mutations.js
View file @
0d086448
...
@@ -34,12 +34,11 @@ export default {
...
@@ -34,12 +34,11 @@ export default {
// Iterate over every label and add a `set` prop
// Iterate over every label and add a `set` prop
// to determine whether it is already a part of
// to determine whether it is already a part of
// selectedLabels array.
// selectedLabels array.
const
selectedLabelIds
=
state
.
selectedLabels
.
map
((
label
)
=>
label
.
id
);
state
.
labelsFetchInProgress
=
false
;
state
.
labelsFetchInProgress
=
false
;
state
.
labelsFetched
=
true
;
state
.
labelsFetched
=
true
;
state
.
labels
=
labels
.
map
((
label
)
=>
({
state
.
labels
=
labels
.
map
((
label
)
=>
({
...
label
,
...
label
,
set
:
s
electedLabelIds
.
includes
(
label
.
id
),
set
:
s
tate
.
selectedLabels
.
some
((
selectedLabel
)
=>
selectedLabel
.
id
===
label
.
id
),
}));
}));
},
},
[
types
.
RECEIVE_SET_LABELS_FAILURE
](
state
)
{
[
types
.
RECEIVE_SET_LABELS_FAILURE
](
state
)
{
...
@@ -79,10 +78,9 @@ export default {
...
@@ -79,10 +78,9 @@ export default {
},
},
[
types
.
UPDATE_LABELS_SET_STATE
](
state
)
{
[
types
.
UPDATE_LABELS_SET_STATE
](
state
)
{
const
selectedLabelIds
=
state
.
selectedLabels
.
map
((
label
)
=>
label
.
id
);
state
.
labels
=
state
.
labels
.
map
((
label
)
=>
({
state
.
labels
=
state
.
labels
.
map
((
label
)
=>
({
...
label
,
...
label
,
set
:
s
electedLabelIds
.
includes
(
label
.
id
),
set
:
s
tate
.
selectedLabels
.
some
((
selectedLabel
)
=>
selectedLabel
.
id
===
label
.
id
),
}));
}));
},
},
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment