Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Return empty activity array if not found

天舟aaa6dde9dde8
diff --git a/frontend/src/store/modules/activity.ts b/frontend/src/store/modules/activity.ts
index b321bdb471..c3db0c9426 100644
--- a/frontend/src/store/modules/activity.ts
+++ b/frontend/src/store/modules/activity.ts
@@ -26,11 +26,15 @@ const state: () => ActivityState = () => ({
});
const getters = {
- activityListByUser: (state: ActivityState) => (userId: UserId) => {
- return state.activityListByUser.get(userId);
+ activityListByUser: (state: ActivityState) => (
+ userId: UserId
+ ): Activity[] => {
+ return state.activityListByUser.get(userId) || [];
},
- activityListByTask: (state: ActivityState) => (taskId: TaskId) => {
- return state.activityListByTask.get(taskId);
+ activityListByTask: (state: ActivityState) => (
+ taskId: TaskId
+ ): Activity[] => {
+ return state.activityListByTask.get(taskId) || [];
},
};