diff --git a/analysis/index.ts b/analysis/index.ts index ffe7ef7..889891d 100644 --- a/analysis/index.ts +++ b/analysis/index.ts @@ -39,14 +39,14 @@ io.on("connection", (socket: any) => { out: 0, }; } + if (!(meeting in emotions)) { + emotions[meeting] = {}; + } + if (student && !emotions[meeting][student]) { instructors[meeting]["out"]++; emotions[meeting][student] = "out"; } - - if (!(meeting in emotions)) { - emotions[meeting] = {}; - } }); socket.on(