Commit 9de97803 authored by Christopher Mark Fullarton's avatar Christopher Mark Fullarton
Browse files

Fixes confidence slider and reading confidence setting if they are disabled in the environment

parent 8be4e759
......@@ -189,6 +189,7 @@ export class QuizEntity extends AbstractEntity implements IQuizEntity {
status: StatusProtocol.Success,
step: MessageProtocol.Reset,
}));
clearTimeout(this._quizTimerInterval);
}
public stop(): void {
......@@ -324,10 +325,13 @@ export class QuizEntity extends AbstractEntity implements IQuizEntity {
}));
this._quizTimer = this._questionList[this._currentQuestionIndex].timer;
if (this._quizTimer === -1) {
if (this._quizTimer <= 0) {
return;
}
if (this._quizTimerInterval) {
clearInterval(this._quizTimerInterval);
}
this._quizTimerInterval = setInterval(() => {
this._quizTimer--;
this._socketChannel.forEach(socket => SendSocketMessageService.sendMessage(socket, {
......
......@@ -175,7 +175,7 @@ export class MemberRouter extends AbstractRouter {
): Promise<object> {
const activeQuiz: IQuizEntity = QuizDAO.getActiveQuizByName(quizName);
if (!activeQuiz) {
if (!activeQuiz || !nickname) {
return;
}
const result: DeleteWriteOpResultObject = await activeQuiz.removeMember(nickname);
......
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