DEV: Fix a eslint issue
This commit is contained in:
parent
9163b3d2e2
commit
f5956327f8
|
|
@ -13,14 +13,14 @@ export default Route.extend({
|
||||||
afterModel(model) {
|
afterModel(model) {
|
||||||
if (Array.isArray(model)) {
|
if (Array.isArray(model)) {
|
||||||
return Repo.findLatestAll().then((response) => {
|
return Repo.findLatestAll().then((response) => {
|
||||||
JSON.parse(response).repos.forEach((_repo) => {
|
JSON.parse(response).repos.forEach((repoData) => {
|
||||||
const repo = model.find((repo) => repo.path === _repo.path);
|
const repo = model.find((_repo) => _repo.path === repoData.path);
|
||||||
if (!repo) {
|
if (!repo) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
delete _repo.path;
|
delete repoData.path;
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(_repo)) {
|
for (const [key, value] of Object.entries(repoData)) {
|
||||||
repo.latest[key] = value;
|
repo.latest[key] = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue