Skip to content

Commit

Permalink
fix toLowerCase error
Browse files Browse the repository at this point in the history
  • Loading branch information
nitaybz committed Dec 20, 2020
1 parent 569065a commit 5f64630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const removeCachedDevices = function() {
if (accessory.context.serial === '12:34:56:78:9a:bc' && this.anyoneSensor)
return

const deviceInConfig = this.devicesConfig.find(device => device.mac.toLowerCase() === accessory.context.serial || device.ip === accessory.context.serial)
const deviceInConfig = this.devicesConfig.find(device => (device.mac && device.mac.toLowerCase() === accessory.context.serial) || device.ip === accessory.context.serial)
if (deviceInConfig)
return
else {
Expand Down

0 comments on commit 5f64630

Please sign in to comment.