From a2e16fe45084564d961e5debd229494e64cdcaa3 Mon Sep 17 00:00:00 2001
From: bin.shen <bluelazysb@hotmail.com>
Date: Thu, 01 Dec 2016 20:02:59 +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