Skip to content

Commit 1864ff2

Browse files
Removed null check
1 parent 749d43c commit 1864ff2

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/Fable.ReactGoogleMaps/README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)