fix(core,nodes): slot props undefined on first render
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -105,7 +105,7 @@ const getType = (type?: string, template?: GraphEdge['template']) => {
|
||||
if (edgeType && typeof edgeType !== 'string') return edgeType
|
||||
|
||||
const slot = slots?.[`edge-${name}`]
|
||||
if (!slot?.({})) {
|
||||
if (!slot) {
|
||||
warn(`Edge type "${type}" not found and no edge-slot detected. Using fallback type "default".`)
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ const getType = (type?: string, template?: GraphNode['template']) => {
|
||||
if (typeof nodeType !== 'string') return nodeType
|
||||
|
||||
const slot = slots?.[`node-${name}`]
|
||||
if (!slot?.({})) {
|
||||
if (!slot) {
|
||||
warn(`Node type "${type}" not found and no node-slot detected. Using fallback type "default".`)
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user