fix: check if profile existe befort render profile page
This commit is contained in:
@ -10,6 +10,10 @@ export default class extends AbstractView {
|
||||
async postInit()
|
||||
{
|
||||
let profile = await client.profiles.getProfile(this.user_id);
|
||||
|
||||
if (profile === null)
|
||||
return 1;
|
||||
|
||||
let info = document.getElementById("info");
|
||||
|
||||
// Username
|
||||
@ -18,7 +22,7 @@ export default class extends AbstractView {
|
||||
username.appendChild(document.createTextNode(profile.username));
|
||||
info.appendChild(username);
|
||||
|
||||
info.appendChild(document.createElement("br"));
|
||||
info.appendChild(document.createElement("br"));
|
||||
|
||||
// Avatar
|
||||
let avatar = document.createElement("img");
|
||||
|
Reference in New Issue
Block a user