From c7cf0b853b787b9899e2e07805102f288c2cdcaf Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Tue, 5 Nov 2024 07:24:15 +0700 Subject: [PATCH] MISC: Minor code change in SkillElem.tsx (#1751) --- src/Bladeburner/ui/SkillElem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bladeburner/ui/SkillElem.tsx b/src/Bladeburner/ui/SkillElem.tsx index be1580977e..b22a089608 100644 --- a/src/Bladeburner/ui/SkillElem.tsx +++ b/src/Bladeburner/ui/SkillElem.tsx @@ -21,7 +21,7 @@ export function SkillElem({ skill, bladeburner, onUpgrade }: SkillElemProps): Re // No need to support "+1" button when the skill level reaches Number.MAX_SAFE_INTEGER. const isSupported = skillLevel < Number.MAX_SAFE_INTEGER; // Use skill.canUpgrade() instead of reimplementing all conditional checks. - const canLevel = isSupported ? skill.canUpgrade(bladeburner, 1).available ?? false : false; + const canLevel = isSupported && skill.canUpgrade(bladeburner, 1).available; /** * maxLvl is only useful when we check if we should show "MAX LEVEL". For the check of the icon button, we don't need * it. This condition is checked in skill.canUpgrade().