mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-31 07:11:33 +00:00
Sorry.
At first I was concerned due to a particular ESLint rule called "no-undefined", but then after looking more deeply into it, I realized using typeof was unnecessary since "no-global-assign" and "no-shadow-restricted-names" were enabled and thus the previous method surely would not cause any problems.
This commit is contained in:
parent
8598001ee3
commit
fb63ed50ea
@ -98,7 +98,7 @@ uploadsController.actuallyUpload = async (req, res, userid, album) => {
|
||||
hash: fileHash,
|
||||
ip: req.ip,
|
||||
albumid: album,
|
||||
userid: typeof userid !== 'undefined' ? userid.id : null,
|
||||
userid: userid !== undefined ? userid.id : null,
|
||||
timestamp: Math.floor(Date.now() / 1000)
|
||||
})
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user