fix: use correct property to generate icon URL

This commit is contained in:
Yarmo Mackenbach 2023-10-03 12:57:39 +02:00
parent b1bc1328eb
commit 86b2b35462
No known key found for this signature in database
GPG key ID: 3C57D093219103A3

View file

@ -65,8 +65,8 @@ export class Claim extends HTMLElement {
root.querySelector('.info .subtitle').innerText = claimJson.display.serviceProviderName ?? root.querySelector('.info .subtitle').innerText = claimJson.display.serviceProviderName ??
(claim.status < 300 ? '???' : '---'); (claim.status < 300 ? '???' : '---');
root.querySelector('.info img').setAttribute('src', root.querySelector('.info img').setAttribute('src',
`https://design.keyoxide.org/brands/service-providers/${claimJson.display.serviceProviderName `https://design.keyoxide.org/brands/service-providers/${claimJson.display.serviceProviderId
? claimJson.display.serviceProviderName.toLowerCase() : '_'}/icon.svg`); ? claimJson.display.serviceProviderId : '_'}/icon.svg`);
try { try {
if (claim.status >= 200) { if (claim.status >= 200) {