From bd0cf98a5a84ea30874b87a5dde048a02441a629 Mon Sep 17 00:00:00 2001 From: Bryce Jacobs Date: Thu, 8 Oct 2015 18:54:36 -0500 Subject: [PATCH] work --- lib/hci-socket/gatt.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/hci-socket/gatt.js b/lib/hci-socket/gatt.js index 5d330703..07df80af 100644 --- a/lib/hci-socket/gatt.js +++ b/lib/hci-socket/gatt.js @@ -218,11 +218,9 @@ Gatt.prototype.addService = function AddGATTService(service, indicate){ * to be added to take the first spot AFTER our last service that's on the array. */ var lastServiceIndex = null; - console.log(handles); for(var i = 0; i < handles.length; i++){ var handle = handles[i]; - console.log(handle); - if(handle.type === 'service'){ + if(handle && handle.type === 'service'){ lastServiceIndex = i; } }