diff --git a/index.js b/index.js index a20f0d30efad5a00c89054726eed456a8616ce64..5f21fd4a5b55dda02ad3a6152a17bd19b416b48c 100644 --- a/index.js +++ b/index.js @@ -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 );