diff --git a/.gitignore b/.gitignore index 58ea7ad..0c58568 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ # dependencies /ui/node_modules +/ui/package-lock.json # profiling files chrome-profiler-events*.json diff --git a/ui/package.json b/ui/package.json index 3c87629..604f0ad 100644 --- a/ui/package.json +++ b/ui/package.json @@ -38,6 +38,7 @@ "@fortawesome/free-solid-svg-icons": "^7.1.0", "@ng-bootstrap/ng-bootstrap": "^20.0.0", "@ng-select/ng-select": "^21.1.0", + "@popperjs/core": "^2.11.8", "bootstrap": "^5.3.6", "ngx-cookie-service": "^21.1.0", "ngx-socket-io": "~4.9.3", @@ -59,4 +60,4 @@ "typescript-eslint": "8.47.0", "vitest": "^4.0.8" } -} \ No newline at end of file +} diff --git a/ui/src/app/services/downloads.service.ts b/ui/src/app/services/downloads.service.ts index a63f637..7285f39 100644 --- a/ui/src/app/services/downloads.service.ts +++ b/ui/src/app/services/downloads.service.ts @@ -118,12 +118,15 @@ export class DownloadsService { } public delById(where: State, ids: string[]) { - ids.forEach(id => { - const obj = this[where].get(id) - if (obj) { - obj.deleting = true + const map = this[where]; + if (map) { + for (const id of ids) { + const obj = map.get(id); + if (obj) { + obj.deleting = true; + } } - }); + } return this.http.post('delete', {where: where, ids: ids}); }