We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ee24df commit a79f943Copy full SHA for a79f943
1 file changed
src/server/trpc/routers/area.ts
@@ -17,8 +17,9 @@ export const areaRouter = router({
17
code: z.string(),
18
}),
19
)
20
- .query(({ input: { code, areaSetCode } }) => {
21
- return findAreaByCodeWithGeometry(code, areaSetCode);
+ .query(async ({ input: { code, areaSetCode } }) => {
+ const area = await findAreaByCodeWithGeometry(code, areaSetCode);
22
+ return area ?? null;
23
24
search: protectedProcedure
25
.input(
0 commit comments