Skip to content

Commit

Permalink
Merge pull request #213 from neilenns/neilenns/issue209
Browse files Browse the repository at this point in the history
Fix typeguards for station state again
  • Loading branch information
neilenns authored Jul 31, 2024
2 parents 4f08ab9 + 818d879 commit 0243716
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/interfaces/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,9 @@ export function isStationStateUpdateAvailable(
): message is StationStateUpdateAvailable {
return (
message.type === "kStationStateUpdate" &&
message.value.isAvailable !== undefined &&
message.value.isAvailable
// This is for backwards compatibility with older versions of TrackAudio
// that do not include the isAvailable property.
(message.value.isAvailable === undefined || message.value.isAvailable)
);
}

Expand Down

0 comments on commit 0243716

Please sign in to comment.