回答編集履歴

1

参考の追加

2022/12/31 08:16

投稿

uky
uky

スコア207

test CHANGED
@@ -20,3 +20,7 @@
20
20
  ```
21
21
 
22
22
  prismaの`findFirst`が返却するのは配列ではないので、`dailyReports.map`が呼べなくなっているのではないでしょうか。
23
+
24
+ 参考のReturnTypeを確認するとObjectかnullかエラーが返るとあります。
25
+
26
+ 参考:https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#findfirst