Skip to content

Commit

Permalink
fix: Update code now that field in non-nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Dec 6, 2024
1 parent 3439fe7 commit 30841ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/data/buildPriceRepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ const getBuildPriceByHouseType = async (houseType: string): Promise<number> => {
select: { priceMid: true },
});

// Cast to string as 'not: null' clause in Prisma query does not type narrow
return buildPrice as number;
return buildPrice;
} catch (error) {
throw new Error(
`Data error: Unable to get buildPrice for houseType ${houseType}`
Expand Down

0 comments on commit 30841ab

Please sign in to comment.