fix: missing default vars in multerStorage

This commit is contained in:
Bobby 2022-04-15 20:31:12 +07:00
parent db254c602b
commit dd6f225461
No known key found for this signature in database
GPG Key ID: 941839794CBF5A09

View File

@ -26,7 +26,7 @@ DiskStorage.prototype._handleFile = function _handleFile (req, file, cb) {
let tempError = null
let tempObject = {}
let tempWeight = 0
const _cb = (err, result, weight = 1) => {
const _cb = (err = null, result = {}, weight = 1) => {
tempError = err
tempWeight += weight
tempObject = Object.assign(result, tempObject)