Skip to content

Commit e8df1b6

Browse files
committed
fix(partial): adding check if not new to prevent emitting partials if new
1 parent f33075c commit e8df1b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ module.exports = exports = function MongooseTrigger(schema, options) {
7474
.catch(err => console.error('[ERROR] -> mongoose-trigger -> ', err))
7575
}
7676

77-
if(this.modifiedPartials) {
77+
if(!this.wasNew && this.modifiedPartials) {
7878
options.partials
7979
.filter(partial => Intersect(partial.triggers.split(' '), this.modifiedPartials).length)
8080
.forEach(partial => {

0 commit comments

Comments
 (0)