KaiSong-UK opened a new pull request, #18456: URL: https://github.com/apache/dolphinscheduler/pull/18456
## Purpose Fix \Cannot read properties of undefined (reading 'releaseState')\ when clicking Edit on a task in the DAG editor. Closes #18448 ## Changes In \dolphinscheduler-ui/src/views/projects/workflow/components/dag/index.tsx\: - \startDisplay\ computed: Changed \props.definition!.workflowDefinition.releaseState\ to \props.definition?.workflowDefinition?.releaseState\ - \menuDisplay\ computed: Changed \props.definition!.workflowDefinition.releaseState\ to \props.definition?.workflowDefinition?.releaseState\ ## Root Cause The TypeScript non-null assertion operator (\!\) has no runtime effect. When \workflowDefinition\ is \undefined\ (transient state, unsaved draft, etc.), accessing \.releaseState\ throws a runtime TypeError. ## Notes - This aligns these two computed properties with the existing safe pattern already used in \dag-toolbar.tsx\ (lines 276 and 512 use \props.definition?.workflowDefinition?.releaseState\) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
