Skip to content

Commit 489e1f3

Browse files
bramuschristopherdro
authored andcommitted
Allow fitToCoordinates to be called without options parameter (react-native-maps#1817)
Right now it's not possible to call `fitToCoordinates` without an `options` parameter, even though defaults are defined in the function body. This commit set the default value of the `options` parameter of to an empty object, allowing one to call the function without it _(and with respect for the defaults)_.
1 parent 8c9e822 commit 489e1f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/components/MapView.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ class MapView extends React.Component {
515515
this._runCommand('fitToSuppliedMarkers', [markers, animated]);
516516
}
517517

518-
fitToCoordinates(coordinates = [], options) {
518+
fitToCoordinates(coordinates = [], options = {}) {
519519
const {
520520
edgePadding = { top: 0, right: 0, bottom: 0, left: 0 },
521521
animated = true,

0 commit comments

Comments
 (0)