Skip to content

Commit

Permalink
Change line 47 for correctness
Browse files Browse the repository at this point in the history
MyCustomStorage constructor had an attribution to opts object, which was absolutely wrong, since we would like to access getDestination as a method of MyCustomStorage in line 51. Hence the right statement is assigning the value to 'this' which represents the object itself.
  • Loading branch information
milseg committed Apr 2, 2016
1 parent 79e2c47 commit 0d8908a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion StorageEngine.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function getDestination (req, file, cb) {
}

function MyCustomStorage (opts) {
opts.getDestination = (opts.destination || getDestination)
this.getDestination = (opts.destination || getDestination)
}

MyCustomStorage.prototype._handleFile = function _handleFile (req, file, cb) {
Expand Down

0 comments on commit 0d8908a

Please sign in to comment.