Skip to content

Commit 38d418a

Browse files
committed
Possibly made profiles a tad more stable
1 parent 887e821 commit 38d418a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/ui/ui.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,21 @@ async function showJoinRoomMenu() {
5656
async function saveUserInfo() {
5757
newNick = document.getElementById("displayInput").value;
5858
if (newNick.replaceAll(" ", "") != "") {
59-
currentNick = newNick
59+
currentNick = newNick;
6060
}
6161
selectionObj = document.getElementById("userIconSelection");
6262
if (selectionObj.value != "") {
6363
if (selectionObj.files[0].size > userIconFileSizeLimit) {
6464
console.log("Img too large");
6565
showError("Image must be less than " + (userIconFileSizeLimit / 1024 ** 2).toFixed(2) + "MiB.");
66+
return;
6667
} else {
6768
cid = await ipfs.add(selectionObj.files[0]);
6869
currentImg = cid.path;
6970
await localforage.setItem("currentImg", currentImg);
7071
}
7172
}
73+
await localforage.setItem('nick', currentNick);
7274

7375
publishProfile();
7476
updatePersonalNickDisplay();

0 commit comments

Comments
 (0)