mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 21:07:28 -08:00
check endpoint exists
This commit is contained in:
parent
967f9e0f7c
commit
67991e8a3d
|
@ -45,10 +45,10 @@ const module: Module<IVersionsState, IRootState> = {
|
|||
},
|
||||
actions: {
|
||||
async fetchVersions(context: ActionContext<IVersionsState, IRootState>) {
|
||||
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});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue