From d36e9e14cc087dc15c6414fb2b622049ca03957f Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Fri, 12 Feb 2016 15:55:18 +0000 Subject: [PATCH] modified to use events, hopefully will fix the crashing particle --- routes/temp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/temp.js b/routes/temp.js index 053b772..3153f51 100644 --- a/routes/temp.js +++ b/routes/temp.js @@ -128,10 +128,10 @@ router.post('/', function (req, res, next) { logger.debug(t); console.log(typeof t); //t = JSON.parse(t); - if(t.hasOwnProperty(data)){ + if(t.hasOwnProperty('data')){ var data = t.data; dataJSON = JSON.parse(data); - if(t.hasOwnProperty(temp)) { + if(t.hasOwnProperty('temp')) { } else