fix(core,nodes): slot props undefined on first render

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2022-12-30 01:06:52 +01:00
committed by Braks
parent 8531ee3ad5
commit c1b1821ee6
2 changed files with 2 additions and 2 deletions
@@ -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
}