From 4be151e8246c919d16dbf516f5e83266c8fd5ec2 Mon Sep 17 00:00:00 2001 From: DaPigGuy Date: Sat, 26 Oct 2024 23:05:30 -0700 Subject: [PATCH] Fix component images in Crafting Component section --- src/utils/items.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/utils/items.js b/src/utils/items.js index a8ec4c0..27a01b5 100644 --- a/src/utils/items.js +++ b/src/utils/items.js @@ -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("-")