Skip to content

Commit bfed93f

Browse files
committed
fix: check if resetVariable is truthy before adding it to updateNode
1 parent d18072a commit bfed93f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/containers/CategoricalList/CategoricalListItem.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ const CategoricalListItem = (props) => {
8181
{},
8282
{
8383
[variable]: value,
84-
// because category can now be promptVariable or
85-
// otherVariable we need to reset the alternate.
86-
[resetVariable]: null,
84+
// reset is used to clear the variable when a node is moved to a different bin
85+
...(!!resetVariable && { [resetVariable]: null }),
8786
},
8887
'drop',
8988
);

0 commit comments

Comments
 (0)