diff --git a/src/frontend/app/attachments/attachments-list.component.ts b/src/frontend/app/attachments/attachments-list.component.ts
index 7136028bebcb5d8c9fc4bd6d7d37b251c80978e6..fc27fc0d0fd138a4f24f1b27c6f8d14d550eab01 100644
--- a/src/frontend/app/attachments/attachments-list.component.ts
+++ b/src/frontend/app/attachments/attachments-list.component.ts
@@ -41,7 +41,6 @@ export class AttachmentsListComponent implements OnInit {
     lang: any = LANG;
     attachments: any;
     loading: boolean = true;
-    resIds: number[] = [];
     pos = 0;
     mailevaEnabled: boolean = false;
 
@@ -81,9 +80,9 @@ export class AttachmentsListComponent implements OnInit {
     }
 
     loadAttachments(resId: number) {
-        this.resIds[0] = resId;
+        this.resId = resId;
         this.loading = true;
-        this.http.get("../../rest/resources/" + this.resIds[0] + "/attachments")
+        this.http.get("../../rest/resources/" + this.resId + "/attachments")
             .subscribe((data: any) => {
                 this.mailevaEnabled = data.mailevaEnabled;
                 this.attachments = data.attachments;