Skip to content

Commit aae1407

Browse files
committed
空文字列のpagePathへのフォールバックを削除
1 parent 1011e3e commit aae1407

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/actions/deleteChat.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ export async function deleteChatAction(chatId: string) {
1616
const targetSection = await ctx.drizzle.query.section.findFirst({
1717
where: eq(section.sectionId, deletedChat[0].sectionId),
1818
});
19-
await revalidateChat(chatId, ctx.userId, targetSection?.pagePath ?? "");
19+
if (targetSection) {
20+
await revalidateChat(chatId, ctx.userId, targetSection.pagePath);
21+
}
2022
}

0 commit comments

Comments
 (0)