Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
IslandRhythms committed Jan 6, 2022
1 parent f11bb07 commit 979989c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ Model.prototype.$__version = function(where, delta) {
return;
}

if(key === false) {
if (key === false) {
return;
}

Expand Down
12 changes: 6 additions & 6 deletions test/model.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7563,22 +7563,22 @@ describe('Model', function() {

});
it('Using bulkSave should not trigger an error (gh-11071)', async function() {

const pairSchema = mongoose.Schema({
name: String,
timestamp: String
name: String,
timestamp: String
}, { versionKey: false });

const model = db.model('test', pairSchema);
const tests = [
{ name: 't1', timestamp: Date.now() },
{ name: 't2', timestamp: Date.now() },
{ name: 't3', timestamp: Date.now() },
{ name: 't4', timestamp: Date.now() },
{ name: 't4', timestamp: Date.now() }
];

model.insertMany(tests, {
ordered: false
ordered: false
});
const entries = await model.find({});
for (const p of entries) {
Expand Down

0 comments on commit 979989c

Please sign in to comment.