Skip to content

Commit e3ece89

Browse files
ABTastyAdelCopilot
andauthored
Update lib/Storage/database_management.dart
Co-authored-by: Copilot <[email protected]>
1 parent fec269b commit e3ece89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Storage/database_management.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class DatabaseManagement {
169169
List<Map> result = await db.rawQuery(
170170
'SELECT COUNT(*) as count FROM $nameTable WHERE id = ?', [visitorId]);
171171

172-
int count = result.first['count'] ?? 0;
172+
int count = result.isNotEmpty ? (result.first['count'] ?? 0) : 0;
173173
return count > 0;
174174
} on Exception catch (e) {
175175
Flagship.logger(Level.EXCEPTIONS,

0 commit comments

Comments
 (0)