From 2c75a3db404eec39b5fe7bb7e506153109d1b43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Victor=20Tozatti=20Risso?= <jvtr12@c3sl.ufpr.br> Date: Wed, 3 Aug 2016 14:25:05 -0300 Subject: [PATCH] Change type verification to typeof --- libs/routes/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/routes/api.js b/libs/routes/api.js index b5492602..feebd9c2 100644 --- a/libs/routes/api.js +++ b/libs/routes/api.js @@ -247,7 +247,7 @@ router.get('/enrollments', function(req, res, next) { router.get('/enrollments', function(req, res, next) { log.debug('Request parameters: ${ req }?'); - if (!req.sqlQuery) { + if (typeof req.sqlQuery === 'undefined') { /* Should only happen if there is a bug in the chaining of the * '/enrollments' route, since when no +aggregate+ parameter is given, * it defaults to use the query for the whole country. -- GitLab