Skip to content

Commit 89ab229

Browse files
dependabot[bot]ErrorPro
authored andcommitted
Bump lodash from 4.17.4 to 4.17.21 (#101)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.4 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.4...4.17.21) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 59ac59e commit 89ab229

File tree

7 files changed

+14
-28
lines changed

7 files changed

+14
-28
lines changed

lib/ReactGoogleAutocomplete.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/usePlacesAutocompleteService.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/usePlacesWidget.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 3 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ReactGoogleAutocomplete.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ ReactGoogleAutocomplete.propTypes = {
3131
ref: PropTypes.oneOfType([
3232
// Either a function
3333
PropTypes.func,
34-
// Or the instance of a DOM native element
35-
PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
34+
// Or anything shaped { current: any }
35+
PropTypes.shape({ current: PropTypes.any }),
3636
]),
3737
googleMapsScriptBaseUrl: PropTypes.string,
3838
onPlaceSelected: PropTypes.func,

src/usePlacesAutocompleteService.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useEffect, useCallback, useRef, useState } from "react";
22
import debounceFn from "lodash.debounce";
33

4-
import { loadGoogleMapScript } from "./utils";
4+
import { isBrowser, loadGoogleMapScript } from "./utils";
55
import { GOOGLE_MAP_SCRIPT_BASE_URL } from "./constants";
66

77
export default function usePlacesAutocompleteService({
@@ -58,6 +58,8 @@ export default function usePlacesAutocompleteService({
5858
);
5959

6060
useEffect(() => {
61+
if (!isBrowser) return;
62+
6163
const buildService = () => {
6264
// eslint-disable-next-line no-undef
6365
if (!google)

src/usePlacesWidget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default function usePlacesWidget(props) {
4646
config.componentRestrictions = componentRestrictions;
4747
}
4848

49-
if (autocompleteRef.current || !inputRef.current) return;
49+
if (autocompleteRef.current || !inputRef.current || !isBrowser) return;
5050

5151
if (ref && !ref.current) ref.current = inputRef.current;
5252

0 commit comments

Comments
 (0)