The-Creative-Programming-Group / Weather-App

Either all code paths should have explicit returns, or none of them JS-0045
Anti-pattern
Minor
2 months ago7 months old
Expected to return a value at the end of async method 'handler'
45// instead of a bounding box search, we could use something like geohashes to find all nearby cities more efficiently and quickly.
46export const findNearestCityByCoord = mutation({
47  args: { coord: v.object({ lat: v.number(), lon: v.number() }) },
48  handler: async (ctx, args) => {49    const citiesInBoundingBox = await ctx.db
50      .query("search")
51      .withIndex("lon_idx", (q) =>
Expected to return a value at the end of arrow function
 839              <div className="ml-4 flex justify-between">
 840                {Object.entries(
 841                  weatherData.data.precipitationProbabilities,
 842                ).map(([key, value]) => { 843                  let raindropClass = "h-full w-full -mt-2";
 844                  if (value !== undefined && value !== null) {
 845                    raindropClass = clsx(