Skip to content

Commit

Permalink
chore(httpSend): Remove unrequired assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterC89 committed Jul 4, 2023
1 parent 27e94ce commit 75a48a9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class HTTPSendDevice extends DeviceWithState<HTTPSendState, DeviceOptions
response: t('Failed to send command: Missing url'),
}
}
if (Object.values<TimelineContentTypeHTTP>(TimelineContentTypeHTTP).includes(cmd.type as TimelineContentTypeHTTP)) {
if (Object.values<TimelineContentTypeHTTP>(TimelineContentTypeHTTP).includes(cmd.type)) {
return {
result: ActionExecutionResultCode.Error,
response: t('Failed to send command: type is invalid'),
Expand All @@ -174,7 +174,7 @@ export class HTTPSendDevice extends DeviceWithState<HTTPSendState, DeviceOptions
}
}

await this._commandReceiver(time, cmd as HTTPSendCommandContent, 'makeReady', '')
await this._commandReceiver(time, cmd, 'makeReady', '')

return {
result: ActionExecutionResultCode.Ok,
Expand Down

0 comments on commit 75a48a9

Please sign in to comment.