Skip to content

Commit 0e4da2c

Browse files
committed
fixed bug with loading profile picture in header user menu
1 parent 5355688 commit 0e4da2c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/header/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ export function createUserMenuItem (child: HTMLElement): HTMLElement {
254254
* @ignore exporting this only for the unit test
255255
*/
256256
export function getProfileImg (store: IndexedFormula, user: NamedNode): string | HTMLElement {
257-
const profileUrl = null
257+
let profileUrl = null
258258
try {
259-
const profileUrl = widgets.findImage(user)
259+
profileUrl = widgets.findImage(user)
260260
if (!profileUrl) {
261261
return emptyProfile
262262
}
@@ -266,7 +266,7 @@ export function getProfileImg (store: IndexedFormula, user: NamedNode): string |
266266

267267
const profileImage = document.createElement('div')
268268
addStyleClassToElement(profileImage, ['header-user-menu__photo'])
269-
profileImage.style.backgroundImage = `url("${profileUrl}")`
269+
profileImage.style.backgroundImage = `url(${profileUrl})`
270270
return profileImage
271271
}
272272

0 commit comments

Comments
 (0)