Skip to content

Commit

Permalink
Fix codec registry
Browse files Browse the repository at this point in the history
  • Loading branch information
srnyx committed Aug 31, 2024
1 parent 21b01f8 commit 64777f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/xyz/srnyx/magicmongo/MagicMongo.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public MagicMongo(@NotNull String connectionUrl) {
*/
@NotNull
public MagicDatabase newMagicDatabase(@NotNull String name) {
final MongoDatabase database = client.getDatabase(name);
if (codecRegistry != null) database.withCodecRegistry(codecRegistry);
MongoDatabase database = client.getDatabase(name);
if (codecRegistry != null) database = database.withCodecRegistry(codecRegistry);
return new MagicDatabase(database);
}

Expand Down

0 comments on commit 64777f4

Please sign in to comment.