Skip to content

Commit e810da3

Browse files
committed
Merge branch 'abnud11-fix/support-mongoose-9'
2 parents a546acd + 164d644 commit e810da3

File tree

3 files changed

+84
-83
lines changed

3 files changed

+84
-83
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ module.exports = function (schema, options) {
116116
if (!this.deleted) {
117117
this.deleted = false;
118118
}
119-
next();
119+
if (mongooseMajorVersion < 9 && typeof next === 'function') {
120+
next();
121+
}
120122
});
121123

122124
if (options.overrideMethods) {

package-lock.json

Lines changed: 79 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
},
2727
"homepage": "https://github.com/dsanel/mongoose-delete",
2828
"peerDependencies": {
29-
"mongoose": "5.x || 6.x || 7.x || 8.x"
29+
"mongoose": "5.x || 6.x || 7.x || 8.x || 9.x"
3030
},
3131
"devDependencies": {
3232
"chai": "^6.2.0",
3333
"mocha": "^11.7.5",
34-
"mongoose": "^8.1.1",
34+
"mongoose": "^9.0.1",
3535
"nyc": "^17.1.0"
3636
}
3737
}

0 commit comments

Comments
 (0)