diff options
| author | Bobby Wibowo <[email protected]> | 2018-01-24 19:38:32 +0700 |
|---|---|---|
| committer | Bobby Wibowo <[email protected]> | 2018-01-24 19:38:32 +0700 |
| commit | 7de25210ce629fff1f731dd8a485ba0a3b8c30b6 (patch) | |
| tree | 2d6bcff39043171f945b8cf84e168facb60b60c4 /controllers/uploadController.js | |
| parent | Fix (diff) | |
| download | host.fuwn.me-7de25210ce629fff1f731dd8a485ba0a3b8c30b6.tar.xz host.fuwn.me-7de25210ce629fff1f731dd8a485ba0a3b8c30b6.zip | |
Proper undefined check
Diffstat (limited to 'controllers/uploadController.js')
| -rw-r--r-- | controllers/uploadController.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/controllers/uploadController.js b/controllers/uploadController.js index 9f10c8c..84fb40c 100644 --- a/controllers/uploadController.js +++ b/controllers/uploadController.js @@ -98,7 +98,7 @@ uploadsController.actuallyUpload = async (req, res, userid, album) => { hash: fileHash, ip: req.ip, albumid: album, - userid: userid !== undefined ? userid.id : null, + userid: typeof userid !== 'undefined' ? userid.id : null, timestamp: Math.floor(Date.now() / 1000) }); } else { |