JS- Strange error with variable?

Hi, I'm currently writing a chat room, and there's a JS function that's not working properly. I've already asked AI, but he couldn't find a solution, so I'm asking here. The function in question is the following: async function login() { const codeInput = document.getElementById('code-input').value; const response = await fetch('users.json'); const users = await response.json();…