ordering-ui-react-native 0.18.72 → 0.18.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.18.72",
3
+ "version": "0.18.73",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -436,16 +436,16 @@ const AddressFormUI = (props: AddressFormParams) => {
436
436
  if (isEditing) {
437
437
  if (formState?.changes?.location) {
438
438
  const prevLocation = {
439
- lat: Math.trunc(locationChange.lat),
440
- lng: Math.trunc(locationChange.lng),
439
+ lat: locationChange?.lat?.toFixed(5),
440
+ lng: locationChange?.lng?.toFixed(5),
441
441
  };
442
442
  const newLocation = {
443
- lat: Math.trunc(formState?.changes?.location?.lat),
444
- lng: Math.trunc(formState?.changes?.location?.lng),
443
+ lat: formState?.changes?.location?.lat?.toFixed(5),
444
+ lng: formState?.changes?.location?.lng?.toFixed(5),
445
445
  };
446
446
  if (
447
- prevLocation.lat !== newLocation.lat &&
448
- prevLocation.lng !== newLocation.lng
447
+ prevLocation?.lat !== newLocation?.lat &&
448
+ prevLocation?.lng !== newLocation?.lng
449
449
  ) {
450
450
  setLocationChange(formState?.changes?.location);
451
451
  }