Fixes bug where editing a node always defaulted to all convergence

This commit is contained in:
Michael Abashian 2023-03-15 09:48:11 -04:00 committed by Michael Abashian
parent 46227f14a1
commit 4302348e8e
No known key found for this signature in database
GPG Key ID: D2E4C11C3E160C1F

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