DEV: Fix a eslint issue

This commit is contained in:
Jarek Radosz 2023-01-22 20:20:28 +01:00
parent 9163b3d2e2
commit f5956327f8
1 changed files with 4 additions and 4 deletions

View File

@ -13,14 +13,14 @@ export default Route.extend({
afterModel(model) {
if (Array.isArray(model)) {
return Repo.findLatestAll().then((response) => {
JSON.parse(response).repos.forEach((_repo) => {
const repo = model.find((repo) => repo.path === _repo.path);
JSON.parse(response).repos.forEach((repoData) => {
const repo = model.find((_repo) => _repo.path === repoData.path);
if (!repo) {
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;
}
});