forked from snxraven/LinkUp-P2P-Chat
Hmm will it work this way?
This commit is contained in:
parent
a9f50e892b
commit
a3fbe7434a
13
app.js
13
app.js
@ -95,13 +95,16 @@ async function initialize() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
readConfigFromFile();
|
const configExists = fs.existsSync("./config.json");
|
||||||
config.rooms.forEach(room => {
|
if (configExists) {
|
||||||
addRoomToList(room);
|
readConfigFromFile();
|
||||||
});
|
config.rooms.forEach(room => {
|
||||||
|
addRoomToList(room);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const registerDiv = document.querySelector('#register');
|
const registerDiv = document.querySelector('#register');
|
||||||
if (registerDiv && config.userName !== '') {
|
if (registerDiv && !configExists) {
|
||||||
registerDiv.classList.remove('hidden');
|
registerDiv.classList.remove('hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user