Skip to content

Commit 7ba11d6

Browse files
committed
Fixed error message
1 parent 7496cf7 commit 7ba11d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/model.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -2861,8 +2861,10 @@ Model.findOneAndReplace = function(filter, replacement, options, callback) {
28612861

28622862
if (arguments.length === 1 && typeof filter === 'function') {
28632863
const msg = 'Model.findOneAndReplace(): First argument must not be a function.\n\n'
2864-
+ ' ' + this.modelName + '.findOneAndReplace(conditions, callback)\n'
2865-
+ ' ' + this.modelName + '.findOneAndReplace(conditions)\n'
2864+
+ ' ' + this.modelName + '.findOneAndReplace(filter, replacement, options, callback)\n'
2865+
+ ' ' + this.modelName + '.findOneAndReplace(filter, replacement, callback)\n'
2866+
+ ' ' + this.modelName + '.findOneAndReplace(filter, replacement)\n'
2867+
+ ' ' + this.modelName + '.findOneAndReplace(filter, callback)\n'
28662868
+ ' ' + this.modelName + '.findOneAndReplace()\n';
28672869
throw new TypeError(msg);
28682870
}

0 commit comments

Comments
 (0)