Skip to content
Permalink
Browse files

fix: add null check for blazor view model property changes (#2305)

  • Loading branch information
glennawatson committed Jan 7, 2020
1 parent 8d7f45d commit 0f0b520b0c29982d26b8f49e216857ac46c756bc
@@ -39,6 +39,7 @@ public ReactiveComponentBase()
{
this.WhenAnyValue(x => x.ViewModel).Subscribe(_ => StateHasChanged());
var viewModelsPropertyChanged = this.WhenAnyValue(x => x.ViewModel)
.Where(x => x != null)
.Select(x => Observable.FromEvent<PropertyChangedEventHandler, Unit>(
eventHandler =>
{
@@ -35,6 +35,7 @@ public ReactiveLayoutComponentBase()
{
this.WhenAnyValue(x => x.ViewModel).Subscribe(_ => StateHasChanged());
var viewModelsPropertyChanged = this.WhenAnyValue(x => x.ViewModel)
.Where(x => x != null)
.Select(x => Observable.FromEvent<PropertyChangedEventHandler, Unit>(
eventHandler =>
{

0 comments on commit 0f0b520

Please sign in to comment.
You can’t perform that action at this time.