Skip to content

Commit

Permalink
Fix drag/drop panic
Browse files Browse the repository at this point in the history
  • Loading branch information
texodus committed May 27, 2023
1 parent 28e8c7a commit 9c38ca7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ where
.iter()
.position(|x| x.1 .1.as_ref().unwrap().props.get_item() == *column);

if let Some(duplicate) = is_duplicate && !ctx.props().allow_duplicates && !is_append {
columns.remove(duplicate);
} else if ctx.props().allow_duplicates && !is_append && is_self_move {
columns.remove(is_duplicate.unwrap());
if let Some(duplicate) = is_duplicate {
if !is_append && (!ctx.props().allow_duplicates || is_self_move) {
columns.remove(duplicate);
}
}

// If inserting into the middle of the list, use
Expand Down

0 comments on commit 9c38ca7

Please sign in to comment.