Skip to content

Commit

Permalink
Make keyword check case-insensitive for 'kuuluvuuskartta'
Browse files Browse the repository at this point in the history
  • Loading branch information
japauliina committed Nov 27, 2024
1 parent b55bfb5 commit 2d16f40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/UnitView/UnitView.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const UnitView = (props) => {
if (!stateUnit || !checkCorrectUnit(stateUnit) || !stateUnit.complete) {
fetchSelectedUnit(unitId, (unit) => {
setUnit(unit);
if (unit?.keywords?.fi?.includes('kuuluvuuskartta')) {
if (unit?.keywords?.fi?.some(keyword => keyword.toLowerCase() === 'kuuluvuuskartta')) {
fetchHearingMaps(unitId);
}
});
Expand Down

0 comments on commit 2d16f40

Please sign in to comment.