Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dgreif committed Feb 4, 2024
1 parent 876b8d4 commit 5624ff7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/homebridge-hatch-baby-rest/rest-iot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@ export class RestIot extends IotDevice<RestIotState> implements BaseDevice {
url: routinesPath,
method: 'GET',
}),
sortedRoutines = allRoutines.sort((a, b) => a.displayOrder - b.displayOrder),
sortedRoutines = allRoutines.sort(
(a, b) => a.displayOrder - b.displayOrder,
),
touchRingRoutines = sortedRoutines.filter((routine) => {
return routine.type === 'favorite' // Before upgrade, only favorites were on touch ring
|| routine.button0 // After upgrade, many routine types can be on touch ring but will have `button0: true`
return (
routine.type === 'favorite' || // Before upgrade, only favorites were on touch ring
routine.button0
) // After upgrade, many routine types can be on touch ring but will have `button0: true`
})

return touchRingRoutines
Expand Down

0 comments on commit 5624ff7

Please sign in to comment.