From cb0cf8b38699d92bba1e0d96cc677afb2eb69180 Mon Sep 17 00:00:00 2001 From: zero Date: Tue, 27 Aug 2024 23:20:00 +0900 Subject: [PATCH] Fix #58 IsCompatibleObject --- .../Internal/NotifyCollectionChangedSynchronizedView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ObservableCollections/Internal/NotifyCollectionChangedSynchronizedView.cs b/src/ObservableCollections/Internal/NotifyCollectionChangedSynchronizedView.cs index d28aea7..ae32b81 100644 --- a/src/ObservableCollections/Internal/NotifyCollectionChangedSynchronizedView.cs +++ b/src/ObservableCollections/Internal/NotifyCollectionChangedSynchronizedView.cs @@ -169,7 +169,7 @@ public TView this[int index] static bool IsCompatibleObject(object? value) { - return (value is T) || (value == null && default(T) == null); + return (value is TView) || (value is T) || (value == null && default(T) == null); } public bool IsReadOnly => true;