Skip to content

Commit

Permalink
Remove redundant condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Maaaartin committed May 19, 2024
1 parent c25f35d commit a1d7db3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Tracker extends EventEmitter {
this.hook();
}

public get Devices(): IDevice[] {
public get Devices(): Device[] {
return Array.from(this.deviceMap?.values() || []);
}

Expand Down Expand Up @@ -65,7 +65,7 @@ export class Tracker extends EventEmitter {

map.set(d.id, currentDevice);

if (currentDevice && d.state !== currentDevice.state) {
if (d.state !== currentDevice.state) {
(currentDevice as IDevice).state = d.state;
this.emit('change', currentDevice);
return map;
Expand Down

0 comments on commit a1d7db3

Please sign in to comment.