We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4699cae + d940133 commit 420172aCopy full SHA for 420172a
src/Caliburn.Micro.Platform/Platforms/Xamarin.Forms/AttachedCollection.cs
@@ -55,9 +55,8 @@ protected virtual void OnItemAdded(BindableObject item) {
55
/// </summary>
56
/// <param name="item">The item that was removed.</param>
57
protected virtual void OnItemRemoved(BindableObject item) {
58
- if (item is IAttachedObject) {
59
- if (((IAttachedObject) item).AssociatedObject != null)
60
- ((IAttachedObject) item).Detach();
+ if (item is IAttachedObject && ((IAttachedObject) item).AssociatedObject != null) {
+ ((IAttachedObject) item).Detach();
61
}
62
63
0 commit comments