mirror of
https://github.com/langgenius/dify.git
synced 2026-04-25 05:06:15 +08:00
perf: Add null check for onAssembleVariables callback
This commit is contained in:
@ -255,7 +255,7 @@ const ComponentPicker = ({
|
||||
}, [editor, getMatchFromSelection, agentBlock, handleClose])
|
||||
|
||||
const isAgentTrigger = triggerString === '@' && agentBlock?.show
|
||||
const showAssembleVariables = triggerString === '/'
|
||||
const showAssembleVariables = triggerString === '/' && workflowVariableBlock?.showAssembleVariables && !!workflowVariableBlock?.onAssembleVariables
|
||||
const agentNodes: AgentNode[] = useMemo(() => agentBlock?.agentNodes || [], [agentBlock?.agentNodes])
|
||||
const handleOpen = useCallback(() => {
|
||||
if (isSupportSandbox && triggerString === '/')
|
||||
|
||||
@ -502,7 +502,7 @@ const VarReferenceVars: FC<Props> = ({
|
||||
}
|
||||
|
||||
{
|
||||
showAssembleVariables && (
|
||||
showAssembleVariables && onAssembleVariables && (
|
||||
<div className="flex items-center border-t border-divider-subtle pt-1">
|
||||
<button
|
||||
type="button"
|
||||
|
||||
Reference in New Issue
Block a user