Skip to content

Commit

Permalink
Fixed removeLinkedService
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Sep 23, 2020
1 parent c06dbb8 commit 62348d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/Accessory.ts
Expand Up @@ -426,7 +426,7 @@ export class Accessory extends EventEmitter<Events> {
this._updateConfiguration();
} else {
this.emit(AccessoryEventTypes.SERVICE_CONFIGURATION_CHANGE, clone({accessory:this, service:service}));

for (const accessory of this.bridgedAccessories) {
accessory.removeLinkedService(service);
}
Expand All @@ -436,9 +436,9 @@ export class Accessory extends EventEmitter<Events> {
}
}

private removeLinkedService(service: Service) {
private removeLinkedService(removed: Service) {
for (const service of this.services) {
service.removeLinkedService(service);
service.removeLinkedService(removed);
}
}

Expand Down

0 comments on commit 62348d3

Please sign in to comment.