@ttoss/google-maps 1.21.0 → 1.21.2

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/dist/esm/index.js CHANGED
@@ -152,7 +152,7 @@ var usePlacesAutocomplete = ({
152
152
  return;
153
153
  }
154
154
  const { current: gMaps } = googleMapsRef;
155
- const placesLib = (gMaps == null ? void 0 : gMaps.places) || googleMaps.places;
155
+ const placesLib = gMaps?.places || googleMaps.places;
156
156
  if (!placesLib) {
157
157
  return;
158
158
  }
@@ -170,7 +170,6 @@ var usePlacesAutocomplete = ({
170
170
  }, []);
171
171
  const fetchPredictions = useCallback(
172
172
  debounce_default((val) => {
173
- var _a;
174
173
  if (!val) {
175
174
  clearSuggestions();
176
175
  return;
@@ -199,7 +198,7 @@ var usePlacesAutocomplete = ({
199
198
  return;
200
199
  }
201
200
  }
202
- (_a = asRef == null ? void 0 : asRef.current) == null ? void 0 : _a.getPlacePredictions(
201
+ asRef?.current?.getPlacePredictions(
203
202
  { ...requestOptionsRef.current, input: val },
204
203
  (data, status) => {
205
204
  setSuggestions({ loading: false, status, data: data || [] });
package/dist/index.js CHANGED
@@ -187,7 +187,7 @@ var usePlacesAutocomplete = ({
187
187
  return;
188
188
  }
189
189
  const { current: gMaps } = googleMapsRef;
190
- const placesLib = (gMaps == null ? void 0 : gMaps.places) || googleMaps.places;
190
+ const placesLib = gMaps?.places || googleMaps.places;
191
191
  if (!placesLib) {
192
192
  return;
193
193
  }
@@ -205,7 +205,6 @@ var usePlacesAutocomplete = ({
205
205
  }, []);
206
206
  const fetchPredictions = (0, import_react2.useCallback)(
207
207
  debounce_default((val) => {
208
- var _a;
209
208
  if (!val) {
210
209
  clearSuggestions();
211
210
  return;
@@ -234,7 +233,7 @@ var usePlacesAutocomplete = ({
234
233
  return;
235
234
  }
236
235
  }
237
- (_a = asRef == null ? void 0 : asRef.current) == null ? void 0 : _a.getPlacePredictions(
236
+ asRef?.current?.getPlacePredictions(
238
237
  { ...requestOptionsRef.current, input: val },
239
238
  (data, status) => {
240
239
  setSuggestions({ loading: false, status, data: data || [] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/google-maps",
3
- "version": "1.21.0",
3
+ "version": "1.21.2",
4
4
  "license": "UNLICENSED",
5
5
  "author": "ttoss",
6
6
  "contributors": [
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "typings": "dist/index.d.ts",
21
21
  "dependencies": {
22
- "@ttoss/hooks": "^1.20.10",
22
+ "@ttoss/hooks": "^1.20.12",
23
23
  "@types/google.maps": "^3.49.2",
24
24
  "use-callback-ref": "^1.3.0"
25
25
  },
@@ -28,11 +28,11 @@
28
28
  "react-dom": ">=16.8.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@ttoss/config": "^1.21.0",
32
- "@ttoss/test-utils": "^1.18.1"
31
+ "@ttoss/config": "^1.25.0",
32
+ "@ttoss/test-utils": "^1.18.3"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "7283c8bffc1b432659339927173eee2ad19b622d"
37
+ "gitHead": "88b98945c469cdfdece6b12ce41243403ad2c242"
38
38
  }