mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
simplify store suggested array
This commit is contained in:
parent
ac550e05e8
commit
120e7cade5
@ -65,7 +65,7 @@ let getDataPromise = getAccompanyingCourse(id)
|
||||
if (payload.query.length >= 3) {
|
||||
searchPersons(payload.query)
|
||||
.then(suggested => new Promise((resolve, reject) => {
|
||||
commit('loadSuggestions', suggested);
|
||||
commit('loadSuggestions', suggested.results); // <====
|
||||
resolve();
|
||||
}));
|
||||
} else {
|
||||
|
@ -94,12 +94,10 @@ export default {
|
||||
}
|
||||
},
|
||||
suggested() {
|
||||
if (! this.add_persons.suggested.results) { return []; }
|
||||
return this.add_persons.suggested.results;
|
||||
return this.add_persons.suggested;
|
||||
},
|
||||
suggestedCounter() {
|
||||
if (! this.add_persons.suggested.results) { return 0; }
|
||||
return this.add_persons.suggested.results.length;
|
||||
return this.add_persons.suggested.length;
|
||||
},
|
||||
selected() {
|
||||
return this.add_persons.selected;
|
||||
|
Loading…
x
Reference in New Issue
Block a user