Skip to content

Commit

Permalink
asf
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyson Williams committed Oct 13, 2019
1 parent 7f9fc96 commit b5d54cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Elmish.WPF/ViewModel.fs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ and [<AllowNullLiteral>] internal ViewModel<'model, 'msg>
| _ -> ()

// Remove old values that no longer exist
if newVals.Length = 0
if b.Values.Count <> 0 && newVals.Length = 0
then b.Values.Clear ()
else
for i in b.Values.Count - 1..-1..0 do
Expand Down Expand Up @@ -542,7 +542,7 @@ and [<AllowNullLiteral>] internal ViewModel<'model, 'msg>
| _ -> ()

// Remove old view models that no longer exist
if newSubModels.Length = 0
if b.Vms.Count <> 0 && newSubModels.Length = 0
then b.Vms.Clear ()
else
for i in b.Vms.Count - 1..-1..0 do
Expand Down

0 comments on commit b5d54cd

Please sign in to comment.