error handling for unexistent components import
This commit is contained in:
parent
5f7be7d1a5
commit
1ec23f8a4d
1 changed files with 3 additions and 1 deletions
|
|
@ -15,7 +15,9 @@ import { NodeDataType} from "../../types/flow";
|
|||
export default function GenericNode({ data, selected}:{data:NodeDataType,selected:boolean}) {
|
||||
const {types, deleteNode} = useContext(typesContext);
|
||||
const Icon = nodeIcons[types[data.type]];
|
||||
|
||||
if(!Icon){
|
||||
return
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={ classNames(selected?"border border-blue-500":"border dark:border-gray-700","prompt-node relative bg-white dark:bg-gray-900 w-96 rounded-lg flex flex-col justify-center")}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue