Skip to content

Commit

Permalink
Fix DataBaseManager.openCheck() null check
Browse files Browse the repository at this point in the history
  • Loading branch information
TaYaKi71751 committed Dec 8, 2023
1 parent 65b8d18 commit 73f50fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/database/database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ class DataBaseManager {
}

Future checkOpen() async {
if (!db!.isOpen) db = await openDatabase(dbPath!);
if (db != null){
if (!db!.isOpen) db = await openDatabase(dbPath!);
} else if (db == null) db = await openDatabase(dbPath!);
}

Future<List<Map<String, dynamic>>> query(String str) async {
Expand Down

0 comments on commit 73f50fd

Please sign in to comment.