From 9b072cbd0a3cc8d06130bd7a100426a51322249c Mon Sep 17 00:00:00 2001 From: cabauman Date: Thu, 6 Sep 2018 13:00:37 +0900 Subject: [PATCH] Fix Xamarin.Forms RoutedViewHost exception --- src/ReactiveUI.XamForms/RoutedViewHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ReactiveUI.XamForms/RoutedViewHost.cs b/src/ReactiveUI.XamForms/RoutedViewHost.cs index 90096bb640..c2d5bd1260 100644 --- a/src/ReactiveUI.XamForms/RoutedViewHost.cs +++ b/src/ReactiveUI.XamForms/RoutedViewHost.cs @@ -46,7 +46,7 @@ public RoutedViewHost() }) .Subscribe ()); - var previousCount = this.WhenAnyObservable(x => x.Router.NavigationChanged.CountChanged().Select(_ => x.Router.NavigationStack.Count)).StartWith(this.Router.NavigationStack.Count); + var previousCount = this.WhenAnyObservable(x => x.Router.NavigationChanged).CountChanged().Select(_ => this.Router.NavigationStack.Count).StartWith(this.Router.NavigationStack.Count); var currentCount = previousCount.Skip(1); d (Observable.Zip(previousCount, currentCount, (previous, current) => new { Delta = previous - current, Current = current })