From 473637ceaff378dc309173d3b6f88aca76bf7fbe Mon Sep 17 00:00:00 2001 From: Westin Miller Date: Fri, 27 Oct 2017 20:10:19 -0700 Subject: [PATCH] Fixed issue where constructor overloads killed me --- Torch/Collections/MTObservableCollection.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Torch/Collections/MTObservableCollection.cs b/Torch/Collections/MTObservableCollection.cs index b93a3d1..05a8fd3 100644 --- a/Torch/Collections/MTObservableCollection.cs +++ b/Torch/Collections/MTObservableCollection.cs @@ -102,8 +102,8 @@ namespace Torch.Collections MarkSnapshotsDirty(); OnPropertyChanged(nameof(Count)); - OnCollectionChanged(oldIndex != null - ? new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item, oldIndex) + OnCollectionChanged(oldIndex.HasValue + ? new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item, oldIndex.Value) : new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item)); return true; }