don't use newAvatar/Banner in non-editables

This commit is contained in:
Henry Jameson 2025-08-07 17:10:56 +03:00
commit 11e6349e8d

View file

@ -282,12 +282,14 @@ export default {
// Editable stuff // Editable stuff
avatarImgSrc () { avatarImgSrc () {
const currentUrl = this.user.profile_image_url_original || this.defaultAvatar const currentUrl = this.user.profile_image_url_original || this.defaultAvatar
const newUrl = this.newAvatar === '' ? this.defaultAvatar : this.newAvatar if (!this.editable) return currentUrl
const newUrl = this.newAvatar === null ? this.defaultAvatar : this.newAvatar
return (this.newAvatar === null) ? currentUrl : newUrl return (this.newAvatar === null) ? currentUrl : newUrl
}, },
bannerImgSrc () { bannerImgSrc () {
const currentUrl = this.user.cover_photo || this.defaultBanner const currentUrl = this.user.cover_photo || this.defaultBanner
const newUrl = this.newBanner === '' ? this.defaultBanner : this.newBanner if (!this.editable) return currentUrl
const newUrl = this.newBanner === null ? this.defaultBanner : this.newBanner
return (this.newBanner === null) ? currentUrl : newUrl return (this.newBanner === null) ? currentUrl : newUrl
}, },
defaultAvatar () { defaultAvatar () {