From d32095bd534679f65eecebc81dcd2a295302af6a Mon Sep 17 00:00:00 2001 From: bin.shen <bluelazysb@hotmail.com> Date: Thu, 01 Dec 2016 11:47:23 +0800 Subject: [PATCH] updates --- method.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/method.js b/method.js index c53e226..af6b0f2 100644 --- a/method.js +++ b/method.js @@ -93,7 +93,7 @@ this.updateDeviceLastUpdated(db, mac, function(data) {}); db.collection("devices").find({ mac: mac }).limit(1).next(function(err, doc){ - if (err) return; + if (err || doc == null) return; callback(doc); }); }; -- Gitblit v1.8.0