Skip to content

Commit

Permalink
refactor: cast id to string instead of type check [sc-17085]
Browse files Browse the repository at this point in the history
  • Loading branch information
shiini2 committed Aug 10, 2023
1 parent b16ce96 commit 934994f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/cli/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,8 @@ export default class Deploy extends AuthCommand {
.map(check => check?.physicalId)

heartbeatCheckIds.forEach(async (id) => {
if (id && typeof id === 'string') {
const { data: { pingUrl, name } } = await api.heartbeatCheck.get(id)
this.log(`Ping URL of heartbeat check ${chalk.green(name)} is ${chalk.italic.underline.blue(pingUrl)}.`)
}
const { data: { pingUrl, name } } = await api.heartbeatCheck.get(id as string)
this.log(`Ping URL of heartbeat check ${chalk.green(name)} is ${chalk.italic.underline.blue(pingUrl)}.`)
})
}
} catch (err: any) {
Expand Down

0 comments on commit 934994f

Please sign in to comment.