Skip to content

Commit

Permalink
Merge pull request #13247 from Automattic/vkarpov15/remove-unnecessar…
Browse files Browse the repository at this point in the history
…y-options

fix(model): avoid unnecessary empty options to `createCollection()` with `autoCreate`
  • Loading branch information
vkarpov15 committed Apr 5, 2023
2 parents e201f3b + 7a5a343 commit d4ad085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ Model.init = function init() {
if (!autoCreate) {
return;
}
return await this.createCollection({});
return await this.createCollection();
};

this.$init = _createCollection().then(() => _ensureIndexes());
Expand Down

0 comments on commit d4ad085

Please sign in to comment.