diff --git a/hive/lib/src/hive_impl.dart b/hive/lib/src/hive_impl.dart index 535c060d6..2fb05b7f3 100644 --- a/hive/lib/src/hive_impl.dart +++ b/hive/lib/src/hive_impl.dart @@ -107,8 +107,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;