Apply suggestions from code review
[GitHub/WoltLab/WCF.git] / ts / WoltLabSuite / Core / Ui / Poll / Manager / View / Participants.ts
index 5db68ae988518ca20cf513a99f5ca53f6f0730ed..be59984df9a920cae9202d87428b0650d5645b53 100644 (file)
@@ -19,20 +19,13 @@ export class Participants {
   public constructor(manager: Poll) {
     this.pollManager = manager;
 
-    this.initButton();
-  }
-
-  protected initButton(): void {
     const button = this.pollManager.getElement().querySelector<HTMLButtonElement>(".showPollParticipantsButton");
-
     if (!button) {
       throw new Error(
-        `Could not find button with selector "showPollParticipantsButton" for poll "${this.pollManager.pollID}"`,
+        `Could not find button with selector "showPollParticipantsButton" for poll "${this.pollManager.pollId}"`,
       );
     }
-
     this.button = button;
-
     this.button.addEventListener("click", (event) => {
       if (event) {
         event.preventDefault();
@@ -48,7 +41,7 @@ export class Participants {
         className: "wcf\\data\\poll\\PollAction",
         dialogTitle: this.pollManager.question,
         parameters: {
-          pollID: this.pollManager.pollID,
+          pollID: this.pollManager.pollId,
         },
       });
     }