Merge pull request #1712 from ggurdin/ggurdin/indexeddb-clear-fix

fix: convert boxNames to List in clear function when creating transaction
This commit is contained in:
Krille-chan 2024-02-23 13:00:29 +01:00 committed by GitHub
commit d7596923ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ class BoxCollection with ZoneTransactionMixin {
}); });
Future<void> clear() async { Future<void> clear() async {
final txn = _db.transaction(boxNames, 'readwrite'); final txn = _db.transaction(boxNames.toList(), 'readwrite');
for (final name in boxNames) { for (final name in boxNames) {
unawaited(txn.objectStore(name).clear()); unawaited(txn.objectStore(name).clear());
} }