diff --git a/packages/editor-ui/src/modules/versions.ts b/packages/editor-ui/src/modules/versions.ts index 630787e17f..acd248ce55 100644 --- a/packages/editor-ui/src/modules/versions.ts +++ b/packages/editor-ui/src/modules/versions.ts @@ -45,10 +45,10 @@ const module: Module = { }, actions: { async fetchVersions(context: ActionContext) { - const enabled = context.state.versionNotificationSettings.enabled; - if (enabled) { + const { enabled, endpoint } = context.state.versionNotificationSettings; + if (enabled && endpoint) { const currentVersion = context.rootState.versionCli; - const versions = await getNextVersions(context.state.versionNotificationSettings.endpoint, currentVersion); + const versions = await getNextVersions(endpoint, currentVersion); context.commit('setVersions', {versions, currentVersion}); } },