empty profile-about when opening a profile

otherwise if there's no about text, the text from previously viewed profile will remain
This commit is contained in:
Martti Malmi 2020-04-11 14:20:34 +03:00 committed by GitHub
parent eab8d74292
commit 42bb2cf8c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -680,6 +680,7 @@ function showProfile(pub) {
$('#profile .profile-photo-container').show();
$('#profile .profile-photo').attr('src', photo);
});
$('#profile-about').empty();
gun.user(pub).get('profile').get('about').on(about => {
$('#profile .profile-about').toggle(about && about.length > 0);
$('#profile .profile-about').text(about);