array-sorted-compositing 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -30,7 +30,11 @@ module ::Array::Sorted::Compositing::ArrayInterface
|
|
30
30
|
|
31
31
|
def update_for_parent_insert( requested_parent_index, parent_index, object )
|
32
32
|
|
33
|
-
|
33
|
+
# if requested index is not the same as sorted index we want to delete requested index
|
34
|
+
# that means if child doesn't have it to delete we don't want to do anything for child
|
35
|
+
|
36
|
+
unless requested_parent_index != parent_index and
|
37
|
+
@parent_index_map.replaced_parent_element_with_parent_index?( requested_parent_index )
|
34
38
|
super
|
35
39
|
end
|
36
40
|
|