File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
src/Fable.ReactGoogleMaps Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -141,19 +141,14 @@ let bounds = mapRef.GetBounds()
141141 // ...
142142 let markerPositions: Position list = // ...
143143
144- // In some scenarios ref can be null, f.ex. slow network when the google maps isn't fully loaded yet.
145144 let setRef (ref:obj) =
146145 let bounds = ReactGoogleMaps.Coordinates.newLatLngBounds()
147-
148- match Option.ofObj ref with
149- | Some ref ->
150- markerPositions
151- |> List.fold (fun (acc:LatLngBounds) pos ->
152- acc.extend(!^ pos)
153- ) bounds
154- |> (MapRef ref).FitBounds
155- | _ ->
156- ()
146+
147+ markerPositions
148+ |> List.fold (fun (acc:LatLngBounds) pos ->
149+ acc.extend(!^ pos)
150+ ) bounds
151+ |> (MapRef ref).FitBounds
157152
158153 googleMap [ MapProperties.ApiKey googleMapApiKey
159154 MapProperties.MapContainer "mapContainer"
You can’t perform that action at this time.
0 commit comments