Skip to content

Commit

Permalink
cleanup findIface
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Feb 5, 2019
1 parent c74a611 commit 1b61a07
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions nodes/ccu-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -877,12 +877,10 @@ module.exports = function (RED) {
* @returns {String|null}
*/
findIface(channel) {
let found;
let found = null;
Object.keys(this.metadata.devices).forEach(iface => {
if (!found) {
if (this.metadata.devices[iface][channel]) {
found = iface;
}
if (this.metadata.devices[iface][channel]) {
found = iface;
}
});
return found;
Expand Down

0 comments on commit 1b61a07

Please sign in to comment.