Update index.html

Ryan Danenberg committed commit203a42f28cafb926fd5f13c5c432dd17a3a78695 Browse files
1 file changed+1−1
index.html+1−1View file
@@ -1743,7 +1743,7 @@
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email: demo.email, password, name: demo.name, role: demo.role })
});
- if (regRes.ok) {
+ if (regRes && regRes.ok) {
const regData = await regRes.json();
token = regData.token || regData.accessToken || regData.jwt;
user = regData.user || { email: demo.email, name: demo.name, role: demo.role };