Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Jun 16, 2024
1 parent 9e0234b commit 02142a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/dashboard/src/actions/ai/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ export async function getLatestChat() {
}
);

if (chat.at(0)) {
return RedisClient.hgetall(chat.at(0));
const lastId = chat.at(0);

if (lastId) {
return RedisClient.hgetall(lastId);
}
} catch (error) {
return null;
Expand Down

0 comments on commit 02142a4

Please sign in to comment.