Skip to content

Commit a6df179

Browse files
author
amazon-meaisiah
authored
Merge pull request #374 from awslabs/meaisiah-image-fix
Fix an image URL
2 parents 3aef3a5 + a7d50d0 commit a6df179

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dev-portal/src/services/state.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ reactTo(
120120
function fetchApiImage (apiList) {
121121
apiList.forEach(api => {
122122
if (!api.logo) {
123-
const specificLogo = `/custom-content/api-logos/${api.id}_${api.stage}.png`
123+
const key = api.stage == null ? api.id : `${api.id}_${api.stage}`
124+
const specificLogo = `/custom-content/api-logos/${key}.png`
124125

125126
// fetch automatically follows redirects; setting redirect to `manual` prevents this
126127
// we need to prevent it so that we can accurately determine if the image exists

0 commit comments

Comments
 (0)