diff --git a/hive/lib/src/hive_impl.dart b/hive/lib/src/hive_impl.dart index bbbde0c66..a29db7491 100644 --- a/hive/lib/src/hive_impl.dart +++ b/hive/lib/src/hive_impl.dart @@ -113,8 +113,8 @@ class HiveImpl extends TypeRegistryImpl implements HiveInterface { newBox = BoxImpl(this, name, comparator, compaction, backend); } - await newBox.initialize(); _boxes[name] = newBox; + await newBox.initialize(); completer.complete(); return newBox;