Skip to content

Commit

Permalink
fix: default empty array for functions (#6184)
Browse files Browse the repository at this point in the history
  • Loading branch information
estephinson authored Nov 17, 2023
1 parent 98f531a commit b9cd3ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/commands/logs/functions.mts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ const logsFunction = async (functionName: string | undefined, options: OptionVal
const { site } = command.netlify
const { id: siteId } = site

const { functions } = await client.searchSiteFunctions({ siteId })
const { functions = [] } = await client.searchSiteFunctions({ siteId })

if (functions.length === 0) {
log(`No functions found for the site`)
return
}

let selectedFunction
if (functionName) {
Expand Down

2 comments on commit b9cd3ec

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,396
  • Package size: 404 MB

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,396
  • Package size: 404 MB

Please sign in to comment.