Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (2)
(fix): Logged in user avatar check
· a22ec953
Emiliano Balbuena
authored
Nov 17, 2019
and
Mark Harding
committed
Nov 17, 2019
a22ec953
Merge branch 'hotfix/logged-out-avatars' into 'master'
· 8e845e8d
Mark Harding
authored
Nov 17, 2019
(fix): Logged in user avatar check Closes
#2247
See merge request
!659
8e845e8d
Hide whitespace changes
Inline
Side-by-side
src/app/common/components/avatar/avatar.ts
View file @
8e845e8d
...
...
@@ -63,7 +63,7 @@ export class MindsAvatar {
if
(
this
.
object
.
type
!==
'
user
'
)
{
this
.
src
=
`
${
this
.
minds
.
cdn_url
}
fs/v1/avatars/
${
this
.
object
.
guid
}
/large/
${
this
.
object
.
icontime
}
`
;
}
else
if
(
this
.
object
.
guid
!==
this
.
minds
.
user
.
guid
)
{
}
else
if
(
!
this
.
minds
.
user
||
this
.
object
.
guid
!==
this
.
minds
.
user
.
guid
)
{
this
.
src
=
`
${
this
.
minds
.
cdn_url
}
icon/
${
this
.
object
.
guid
}
/large/
${
this
.
object
.
icontime
}
`
;
}
}
...
...
@@ -130,6 +130,6 @@ export class MindsAvatar {
* @returns true if the object guid matches the currently logged in user guid
*/
isOwnerAvatar
():
boolean
{
return
this
.
object
.
guid
===
this
.
minds
.
user
.
guid
;
return
this
.
minds
.
user
&&
this
.
object
.
guid
===
this
.
minds
.
user
.
guid
;
}
}