Skip to content

Commit

Permalink
Fix component images in Crafting Component section
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Oct 27, 2024
1 parent 5cda0bc commit 4be151e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/utils/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ export function getComponentImageUrl(itemName, componentName, generic, hash) {
return `https://cdn.warframestat.us/img/${(
(componentName.includes(" Prime") ? "prime-" : "") +
(generic
? ingredientSuffixes.find(suffix =>
? (ingredientSuffixes.find(suffix =>
componentName.endsWith(suffix)
) ?? componentName.replace(`${itemName} `, "")
: componentName.replace(`${itemName} `, "") +
(hash ? "-" + hash : ""))
) ?? componentName.replace(`${itemName} `, ""))
: (itemName
? componentName.replace(`${itemName} `, "")
: componentName) + (hash ? "-" + hash : ""))
)
.split(" ")
.join("-")
Expand Down

0 comments on commit 4be151e

Please sign in to comment.