Skip to content

Commit 2ca688c

Browse files
committed
#53 general settings for environment
1 parent 5a47a70 commit 2ca688c

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/app/question-window/question-window.component.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ export class QuestionWindowComponent implements OnInit, OnDestroy {
4646
}
4747

4848
this.startLoadingProgressBar();
49-
50-
while(!this.questionLoaded) {
51-
await this.loadQuestion();
52-
}
49+
await this.loadQuestion();
5350
}
5451

5552
public ngOnDestroy() {
@@ -68,11 +65,7 @@ export class QuestionWindowComponent implements OnInit, OnDestroy {
6865
}
6966

7067
private async loadQuestion(): Promise<void> {
71-
const questions: Question[] = await this.triviaService.fetchQuestion()
72-
73-
if (questions.length === 0)
74-
return;
75-
68+
const questions: Question[] = await this.triviaService.fetchQuestion();
7669
const singleQuiz: Question = questions[0];
7770

7871
this.question = singleQuiz.question;

0 commit comments

Comments
 (0)