Skip to content

Commit 86c27f5

Browse files
committed
fix(activity): add null check to prevent error
1 parent 2f53a05 commit 86c27f5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/stores/data/activity.store.ts

+1
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export const useActivityStore = defineStore(ActivityStoreConstants.Store, () =>
177177
watch(activity, (next, prev) => {
178178
const _prev = prev?.[user.value];
179179
const _next = next?.[user.value];
180+
if (!_prev || !_next) return;
180181
const _changed = compareDateObject(toDateObject(_prev), toDateObject(_next));
181182
Object.assign(evicted, evictChanges(_changed));
182183
});

0 commit comments

Comments
 (0)