Merge pull request #13693 from mabashian/12651-workflow-convergence

Fixes bug where editing a node always defaulted to all convergence
This commit is contained in:
Vishali Sanghishetty 2023-03-20 15:08:52 -04:00 committed by GitHub
commit f3cdf368df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,13 @@ const getNodeToEditDefaultValues = (
// There is a case where the nodeToEdit convergence value will not align with the
// original node object value. This allows the nodeToEdit value to take precedence over the
// original node object.
if (nodeToEdit) {
if (
nodeToEdit &&
Object.prototype.hasOwnProperty.call(
nodeToEdit,
'all_parents_must_converge'
)
) {
return nodeToEdit.all_parents_must_converge ? 'all' : 'any';
}
return nodeToEdit?.originalNodeObject?.all_parents_must_converge