Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
fix: showSwitch value check corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
apexad committed Dec 7, 2020
1 parent f6f9f3e commit 745630d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platformAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class AirportExpress implements AccessoryPlugin {
constructor(hap: HAP, mdns: any, log: Logging, config: PlatformConfig, data: mDNSReply) {
this.log = log;
this.name = data.fullname.replace('._airplay._tcp.local', '');
this.showSwitch = config.showSwitch || true;
this.showSwitch = config.hasOwnProperty('showSwitch') ? config.showSwitch : true;
this.serialNumber = data.txt.find((str) => str.indexOf('serialNumber') > -1)?.replace('serialNumber=', '') || '';
this.hap = hap;
this.mdns = mdns;
Expand Down

0 comments on commit 745630d

Please sign in to comment.