Skip to content

Commit a721e39

Browse files
committed
fix(taskDatabase): add debug message for empty task fetch results
1 parent 74c942c commit a721e39

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/app/v3/db/task_database.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,13 @@ class TaskDatabase {
8686
List<TaskForC> a = await Future.wait(
8787
maps.map((mapItem) => getObjectForTask(mapItem)).toList(),
8888
);
89-
debugPrint("Database fetch ${maps.last}");
90-
for (int i = 0; i < maps.length; i++) {
91-
debugPrint("Database fetch ${maps[i]}");
89+
if (maps.isNotEmpty) {
90+
debugPrint("Database fetch ${maps.last}");
91+
for (int i = 0; i < maps.length; i++) {
92+
debugPrint("Database fetch ${maps[i]}");
93+
}
94+
} else {
95+
debugPrint("Database fetch: No tasks found");
9296
}
9397
debugPrint('Tasks from db');
9498
debugPrint(a.toString());

0 commit comments

Comments
 (0)