Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix typing assertion
Browse files Browse the repository at this point in the history
Benjyhy committed Nov 21, 2024
1 parent aba12de commit 3cfb696
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/admin/newportal/manage/settings/phases/index.tsx
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ const Phases = () => {

const handleHeaderCheckboxChange = (phase: VillagePhase, checked: boolean) => {
for (const key in villagePhases) {
const village = villages.data.find((vil) => vil.id == key);
const village = villages.data.find((vil) => vil.id == +key);
if (villagePhases[key] <= phase && village.activePhase < phase) {

Check failure on line 56 in src/pages/admin/newportal/manage/settings/phases/index.tsx

GitHub Actions / typescript

Object is possibly 'undefined'.
villagePhases[key] = VillagePhase.DISCOVER;
setVillagePhases((prevState) => ({

0 comments on commit 3cfb696

Please sign in to comment.