Replaced typeof with proper undefined check

This commit is contained in:
Ajay Ramachandran
2019-07-17 21:58:40 -04:00
parent 03fcda5e3b
commit 6850414a27

View File

@@ -84,7 +84,7 @@ app.get('/api/postVideoSponsorTimes', function (req, res) {
let endTime = req.query.endTime;
let userID = req.query.userID;
if (typeof videoID != 'string' || startTime == undefined || endTime == undefined || userID == undefined) {
if (videoID != undefined || startTime == undefined || endTime == undefined || userID == undefined) {
//invalid request
res.sendStatus(400);
return;