Skip to content

Commit

Permalink
style: fix lint re: #11380
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Mar 23, 2022
1 parent 7f7735c commit f4a112b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const legacyPluralize = require('./helpers/pluralize');
const utils = require('./utils');
const pkg = require('../package.json');
const cast = require('./cast');
const clearValidating = require('./plugins/clearValidating');
const removeSubdocs = require('./plugins/removeSubdocs');
const saveSubdocs = require('./plugins/saveSubdocs');
const trackTransaction = require('./plugins/trackTransaction');
Expand Down
5 changes: 3 additions & 2 deletions lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ function _applyCustomWhere(doc, where) {
*/

Model.prototype.$__handleSave = function(options, callback) {
let saveOptions = {};
const saveOptions = {};

applyWriteConcern(this.$__schema, options);
if (typeof options.writeConcern !== 'undefined') {
Expand Down Expand Up @@ -311,7 +311,7 @@ Model.prototype.$__handleSave = function(options, callback) {

return;
}

// Make sure we don't treat it as a new object on error,
// since it already exists
this.$__.inserting = false;
Expand Down Expand Up @@ -421,6 +421,7 @@ Model.prototype.$__save = function(options, callback) {
this.$__undoReset();
error = new DocumentNotFoundError(result.$where,
this.constructor.modelName, numAffected, result);
const hooks = this.$__schema.s.hooks;
return hooks.execPost('save:error', this, [this], { error: error }, (error) => {
callback(error, this);
});
Expand Down

0 comments on commit f4a112b

Please sign in to comment.