fix: can not open

This commit is contained in:
Joel 2024-04-03 15:48:49 +08:00
parent f06554a11e
commit c43eaeec06
2 changed files with 5 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import { Variable02 } from '@/app/components/base/icons/src/vender/solid/develop
import TooltipPlus from '@/app/components/base/tooltip-plus'
type Props = {
instanceId?: string
className?: string
placeholder?: string
placeholderClassName?: string
@ -24,6 +25,7 @@ type Props = {
}
const Editor: FC<Props> = ({
instanceId,
className,
placeholder,
placeholderClassName,
@ -52,6 +54,7 @@ const Editor: FC<Props> = ({
<div className={cn(className, 'relative')}>
<>
<PromptEditor
instanceId={instanceId}
className={cn(promptMinHeightClassName, '!leading-[18px]')}
placeholder={placeholder}
placeholderClassName={placeholderClassName}

View File

@ -38,11 +38,11 @@ const ReadonlyInputWithSelectVar: FC<Props> = ({
const value = vars[index].split('.')
const isSystem = isSystemVar(value)
const node = (isSystem ? startNode : getNodeInfoById(availableNodes, value[0])).data
const node = (isSystem ? startNode : getNodeInfoById(availableNodes, value[0]))?.data
const varName = `${isSystem ? 'sys.' : ''}${value[value.length - 1]}`
const type = (() => {
let type = VarType.string
let curr: any = node.vars
let curr: any = node?.vars
if (!curr)
return type