Skip to content

Commit

Permalink
Update schema.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hermesdj committed Jun 24, 2023
1 parent c79e1ba commit be73c07
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,13 @@ function createFileSchema(bucket) {
return done(error);
}
// read file details
// eslint-disable-next-line no-underscore-dangle
return this.constructor.findById(created._id).then(res => done(res)).catch(err => done(err));
return (
this.constructor
// eslint-disable-next-line no-underscore-dangle
.findById(created._id)
.then((res) => done(null, res))
.catch((err) => done(err))
);
}.bind(this)
);
};
Expand Down

0 comments on commit be73c07

Please sign in to comment.