Skip to content

Commit 21967ed

Browse files
committed
fix: error related to archiving days
1 parent e88c909 commit 21967ed

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/services/dataService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ class SupabaseService implements DataService {
243243
console.log('👤 User authenticated:', user.id);
244244

245245
// Get categories and projects for proper name resolution
246-
const categories = await getCachedCategories();
247-
const projects = await getCachedProjects();
246+
const categories = await getCachedCategories() || [];
247+
const projects = await getCachedProjects() || [];
248248

249249
try {
250250
// Start a transaction-like approach with batch operations
@@ -444,8 +444,8 @@ class SupabaseService implements DataService {
444444
console.log('👤 User authenticated:', user.id);
445445

446446
// Get categories and projects for proper name resolution
447-
const categories = await getCachedCategories();
448-
const projects = await getCachedProjects();
447+
const categories = await getCachedCategories() || [];
448+
const projects = await getCachedProjects() || [];
449449

450450
// Validate user ID upfront
451451
if (!user.id) {

0 commit comments

Comments
 (0)