Skip to content

Commit 0f926b9

Browse files
committed
fix(ui): prevent null value in announcements list
1 parent 1fd11a1 commit 0f926b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/admin/src/store/modules/announcement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const useAnnouncementStore = defineStore("adminAnnouncement", () => {
2525

2626
const fetchAnnouncementList = async (data: { page: number; perPage: number; orderBy: "asc" | "desc"; }) => {
2727
const res = await announcementApi.fetchAnnouncementList(data.page, data.perPage, data.orderBy);
28-
announcements.value = res.data as IAdminAnnouncementShort[];
28+
announcements.value = res.data as IAdminAnnouncementShort[] ?? [];
2929
announcementCount.value = parseInt(res.headers["x-total-count"] as string, 10);
3030
};
3131

0 commit comments

Comments
 (0)