safely access pin reset response

pull/1/head
ansuz 8 years ago
parent 2ca6277660
commit 70cae0d2c3

@ -77,6 +77,13 @@ define([
return; return;
} }
rpc.send('RESET', channels, function (e, response) { rpc.send('RESET', channels, function (e, response) {
if (e) {
return void cb(e);
}
if (!response.length) {
console.log(response);
return void cb('INVALID_RESPONSE');
}
cb(e, response[0]); cb(e, response[0]);
}); });
}; };

Loading…
Cancel
Save