From 0f71b4a15bf2dc34ebb0a6ebbfd85d5a7c114102 Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Wed, 9 Jun 2021 16:07:05 +0430 Subject: [PATCH] fix(github): prevent undefined error on last release --- src/core/runtime/composables/releases.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/runtime/composables/releases.ts b/src/core/runtime/composables/releases.ts index 029af5530..d1e9a8ef8 100644 --- a/src/core/runtime/composables/releases.ts +++ b/src/core/runtime/composables/releases.ts @@ -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() {