Merge pull request #11284 from hsm-lv/fix-setvalue

fix:变量赋值导致面板挂掉
This commit is contained in:
hsm-lv 2024-11-28 19:23:23 +08:00 committed by GitHub
commit 767017e763
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -116,7 +116,8 @@ registerActionPanel('setValue', {
'__containerType' '__containerType'
], ],
descDetail: (info: any, context: any, props: any) => { descDetail: (info: any, context: any, props: any) => {
const variableManager = info?.variableManager; const variableManager = props.manager?.variableManager;
return ( return (
<div className="action-desc"> <div className="action-desc">
{/* 只要path字段存在就认为是应用变量赋值无论是否有值 */} {/* 只要path字段存在就认为是应用变量赋值无论是否有值 */}
@ -124,7 +125,7 @@ registerActionPanel('setValue', {
<> <>
<span className="variable-left variable-right"> <span className="variable-left variable-right">
{variableManager.getNameByPath(info.args.path)} {variableManager?.getNameByPath(info.args.path)}
</span> </span>
</> </>