Skip to content

Commit

Permalink
Merge pull request #952 from TimLariviere/fix-dispatch-to-children
Browse files Browse the repository at this point in the history
Fix NullReferenceException when dispatching Mounted event
  • Loading branch information
TimLariviere authored Jun 10, 2022
2 parents 5360395 + b07547f commit 2a07dc6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Fabulous/Dispatch.fs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ module Dispatcher =
| ValueNone -> ()
| ValueSome widgetCollAttrs ->
for widgetCollAttr in widgetCollAttrs do
let struct (_, widgets) = widgetCollAttr.Value

for childWidget in widgets do
for childWidget in ArraySlice.toSpan widgetCollAttr.Value do
dispatchAndVisitChildren false dispatch childWidget

let struct (canDispatch, mapMsg) = getCanDispatchAndMapMsg node
Expand Down

0 comments on commit 2a07dc6

Please sign in to comment.