Commit 3cc1ee43 authored by Florent Chehab's avatar Florent Chehab

fix(joinCampus): working again

Fixes #86
parent 26e608b7
Pipeline #36729 passed with stages
in 5 minutes and 9 seconds
......@@ -306,9 +306,9 @@ class CustomComponentForAPI extends Component {
joinCampus(campus) {
const { universities, countries, cities } = this.getLatestReadDataFor(["universities", "countries", "cities"]);
let res = Object.assign({}, campus); //copy for safety
res.university = universities.find(univ => univ.id = campus.university);
res.city = cities.find(city => city.id = campus.city);
res.country = countries.find(country => country.id = res.city.country);
res.university = universities.find(univ => univ.id == campus.university);
res.city = cities.find(city => city.id == campus.city);
res.country = countries.find(country => country.id == res.city.country);
return res;
}
......
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