mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): Fix bug with node version
This commit is contained in:
parent
d6e5de588a
commit
ed56481243
|
@ -850,13 +850,13 @@ export const store = new Vuex.Store({
|
||||||
}, []);
|
}, []);
|
||||||
},
|
},
|
||||||
|
|
||||||
nodeType: (state, getters) => (nodeType: string, typeVersion?: number): INodeTypeDescription | null => {
|
nodeType: (state, getters) => (nodeType: string, version?: number): INodeTypeDescription | null => {
|
||||||
const foundType = state.nodeTypes.find(typeData => {
|
const foundType = state.nodeTypes.find(typeData => {
|
||||||
const typeVersion = Array.isArray(typeData.version)
|
const typeVersion = Array.isArray(typeData.version)
|
||||||
? typeData.version
|
? typeData.version
|
||||||
: [typeData.version];
|
: [typeData.version];
|
||||||
|
|
||||||
return typeData.name === nodeType && typeVersion.some(versions => [typeVersion, typeData.defaultVersion, DEFAULT_NODETYPE_VERSION].includes(versions));
|
return typeData.name === nodeType && typeVersion.includes(version || typeData.defaultVersion || DEFAULT_NODETYPE_VERSION);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (foundType === undefined) {
|
if (foundType === undefined) {
|
||||||
|
|
Loading…
Reference in a new issue