fixed the optional chaining
This commit is contained in:
@@ -172,7 +172,7 @@ export class HostService {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (host.user.profileImage) {
|
||||
if (host.user?.profileImage) {
|
||||
const key = host.user.profileImage.startsWith("http")
|
||||
? host.user.profileImage.split(".com/")[1]
|
||||
: host.user.profileImage;
|
||||
@@ -180,7 +180,7 @@ export class HostService {
|
||||
host.user.profileImage = await getPresignedUrl(bucket, key);
|
||||
}
|
||||
|
||||
if (host.logoPath) {
|
||||
if (host?.logoPath) {
|
||||
const key = host.logoPath.startsWith('http')
|
||||
? host.logoPath.split('.com/')[1]
|
||||
: host.logoPath;
|
||||
@@ -188,7 +188,7 @@ export class HostService {
|
||||
host.logoPath = await getPresignedUrl(bucket, key);
|
||||
}
|
||||
|
||||
if (host.accountManager.profileImage) {
|
||||
if (host.accountManager?.profileImage) {
|
||||
const key = host.accountManager.profileImage.startsWith('http')
|
||||
? host.accountManager.profileImage.split('.com/')[1]
|
||||
: host.accountManager.profileImage;
|
||||
|
||||
Reference in New Issue
Block a user