Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
fix: prevent delete from sending multiple args in callback
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jacob Heun <jacobheun@gmail.com>
  • Loading branch information
jacobheun authored and daviddias committed May 28, 2018
1 parent ef6c1f0 commit 0940452
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ class FsDatastore {
*/
delete (key /* : Key */, callback /* : Callback<void> */) /* : void */ {
const parts = this._encode(key)
fs.unlink(parts.file, callback)
fs.unlink(parts.file, (err) => {
// Avoid injection of additional params, we only need the error
callback(err)
})
}

/**
Expand Down

0 comments on commit 0940452

Please sign in to comment.