refactor(core): log warnings for non-prod node envs
This commit is contained in:
@@ -3,6 +3,7 @@ import { NodeWrapper } from '../../components'
|
||||
import type { GraphNode, HandleConnectable, NodeComponent } from '../../types'
|
||||
import { useVueFlow } from '../../composables'
|
||||
import { Slots } from '../../context'
|
||||
import { warn } from '../../utils'
|
||||
|
||||
const slots = inject(Slots)
|
||||
|
||||
@@ -45,7 +46,7 @@ const getType = (type?: string, template?: GraphNode['template']) => {
|
||||
|
||||
const slot = slots?.[`node-${name}`]
|
||||
if (!slot?.({})) {
|
||||
console.warn(`[vueflow]: Node type "${type}" not found and no node-slot detected. Using fallback type "default".`)
|
||||
warn(`Node type "${type}" not found and no node-slot detected. Using fallback type "default".`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user