mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
fix: fixed undefined class initialization
This commit is contained in:
@@ -19,7 +19,8 @@ export class NodesPool {
|
|||||||
nodeFiles.map(async (file) => {
|
nodeFiles.map(async (file) => {
|
||||||
if (file.endsWith('.js')) {
|
if (file.endsWith('.js')) {
|
||||||
const nodeModule = await require(file)
|
const nodeModule = await require(file)
|
||||||
try {
|
|
||||||
|
if (nodeModule.nodeClass) {
|
||||||
const newNodeInstance = new nodeModule.nodeClass()
|
const newNodeInstance = new nodeModule.nodeClass()
|
||||||
newNodeInstance.filePath = file
|
newNodeInstance.filePath = file
|
||||||
|
|
||||||
@@ -37,8 +38,6 @@ export class NodesPool {
|
|||||||
const nodeIconAbsolutePath = `${filePath.join('/')}/${newNodeInstance.icon}`
|
const nodeIconAbsolutePath = `${filePath.join('/')}/${newNodeInstance.icon}`
|
||||||
this.componentNodes[newNodeInstance.name].icon = nodeIconAbsolutePath
|
this.componentNodes[newNodeInstance.name].icon = nodeIconAbsolutePath
|
||||||
}
|
}
|
||||||
} catch (e) {
|
|
||||||
// console.error(e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user