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; } }