mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-25 19:41:14 -08:00
check endpoint exists
This commit is contained in:
parent
967f9e0f7c
commit
67991e8a3d
|
@ -45,10 +45,10 @@ const module: Module<IVersionsState, IRootState> = {
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
async fetchVersions(context: ActionContext<IVersionsState, IRootState>) {
|
async fetchVersions(context: ActionContext<IVersionsState, IRootState>) {
|
||||||
const enabled = context.state.versionNotificationSettings.enabled;
|
const { enabled, endpoint } = context.state.versionNotificationSettings;
|
||||||
if (enabled) {
|
if (enabled && endpoint) {
|
||||||
const currentVersion = context.rootState.versionCli;
|
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});
|
context.commit('setVersions', {versions, currentVersion});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue