Skip to content

Commit 66a9a05

Browse files
Jessica Lordmbroadst
Jessica Lord
authored andcommitted
fix(grid-store): add missing callback
1 parent a86359e commit 66a9a05

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/gridfs/grid_store.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,9 @@ var writeFile = function(self, file, callback) {
452452
self.currentChunk = chunk;
453453

454454
if (offset >= stats.size) {
455-
fs.close(file);
455+
fs.close(file, function(err) {
456+
if (err) return callback(err);
457+
});
456458
self.close(function(err) {
457459
if (err) return callback(err, self);
458460
return callback(null, self);

0 commit comments

Comments
 (0)