Skip to content

Commit

Permalink
fix(github): prevent undefined error on last release
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Jun 9, 2021
1 parent 69606ce commit 0f71b4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/runtime/composables/releases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DocusAddonContext } from '../../../types'

export const useDocusReleases = ({ api, state }: DocusAddonContext) => {
async function fetchReleases() {
return (await api.data('github-releases')).releases
return (await api.data('github-releases'))?.releases || []
}

async function fetchLastRelease() {
Expand Down

0 comments on commit 0f71b4a

Please sign in to comment.