Commit 13adb033 authored by Christopher Fullarton's avatar Christopher Fullarton

Fixes console error in the attendeeservice if no response data is available

parent 2978f106
Pipeline #33712 passed with stages
in 14 minutes and 22 seconds
......@@ -102,11 +102,15 @@ export class AttendeeService {
public hasReponse(): boolean {
const response = this.getMember(this.ownNick).responses[this.quizService.quiz.currentQuestionIndex];
if (typeof response === 'undefined' || typeof response.value === 'undefined') {
return false;
}
if (typeof response.value === 'number') {
return response && !isNaN(response.value);
return !isNaN(response.value);
}
return response && response.value.length > 0;
return response.value.length > 0;
}
public hasReadingConfirmation(): boolean {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment