Skip to content

Commit

Permalink
MISC: Minor code change in SkillElem.tsx (bitburner-official#1751)
Browse files Browse the repository at this point in the history
  • Loading branch information
catloversg authored Nov 5, 2024
1 parent 81e068b commit c7cf0b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bladeburner/ui/SkillElem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down

0 comments on commit c7cf0b8

Please sign in to comment.