Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 404 images on hero page #3138

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/Hero/Abilities.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const renderAbilities = abilities => abilities.map(ability => (
));

const Abilities = ({ hero }) => {
const filterAbilities = toFilterAbs => toFilterAbs.filter(ability => (ability !== 'generic_hidden'));

const filterAbilities = (toFilterAbs) =>
toFilterAbs.filter((ability) => ability !== 'generic_hidden' && abilities[ability].behavior !== 'Hidden');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove generic_hidden too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can, but it's more efficient to leave it in since it's a quick check that doesn't require an object lookup in a large json. Happy to remove though, an object lookup shouldn't be too bad since it's a direct key substitute.

const mapAbilities = toFilterAbs => toFilterAbs.map((ability, id) => ({ data: abilities[ability], key: id }));
const mapTalents = talents => talents.map(talent => ({ ...abilities[talent.name], ...talent }));

Expand Down
Loading