* Set default image if nothing was found for category thumbnail

This commit is contained in:
shockrah 2021-10-05 15:58:14 -07:00
parent 3230d7b762
commit c90d969e74
3 changed files with 3 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

@ -15,8 +15,11 @@ class Category {
let nail = document.createElement('img')
nail.className = 'pure-img'
if(!(this.thumbnail_b64 == null || this.thumbnail_b64.length == 0)) {
nail.setAttribute('src', `data:image/jpg;base64,${this.thumbnail_b64}`)
} else{
nail.setAttribute('src', '/cantfindshit.gif')
}
container.appendChild(title)