Skip to content
Snippets Groups Projects
Verified Commit d441f193 authored by Erick Hitter's avatar Erick Hitter
Browse files

Error for buttons without a configuration

parent 8289e669
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,11 @@ client.on( 'newVerifiedButton', function( bdAddr ) {
* BUTTON REACTIONS
*/
function listenToButton( bdAddr ) {
if ( "object" !== typeof config.buttons[bdAddr] ) {
console.error( 'No configuration for button ' + bdAddr );
return;
}
var cc = new FlicConnectionChannel( bdAddr );
client.addConnectionChannel( cc );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment