Fixed current project selection on deletion - Dashboard
authorSebastien Douheret <sebastien.douheret@iot.bzh>
Fri, 24 Nov 2017 14:38:01 +0000 (15:38 +0100)
committerSebastien Douheret <sebastien.douheret@iot.bzh>
Fri, 24 Nov 2017 14:38:01 +0000 (15:38 +0100)
webapp/src/app/@core-xds/services/project.service.ts

index 94469fe..9cf2655 100644 (file)
@@ -246,7 +246,7 @@ export class ProjectService {
     }
     const delId = this._prjsList[idx].id;
     this._prjsList.splice(idx, 1);
-    if (this._prjsList[idx].id === this._current.id) {
+    if (delId === this._current.id) {
       this.setCurrent(this._prjsList[0]);
     }
     this.prjsSubject.next(this._prjsList);