Skip to content

Commit abe3fa3

Browse files
authored
Fix instanceof check (#231)
1 parent 03271dd commit abe3fa3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/usePlacesWidget.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function usePlacesWidget(props) {
7777

7878
if (typeof google === "undefined") return console.error("Google has not been found. Make sure your provide apiKey prop.");
7979
if (!((_google$maps = google.maps) !== null && _google$maps !== void 0 && _google$maps.places)) return console.error("Google maps places API must be loaded.");
80-
if (!inputRef.current instanceof HTMLInputElement) return console.error("Input ref must be HTMLInputElement.");
80+
if (!(inputRef.current instanceof HTMLInputElement)) return console.error("Input ref must be HTMLInputElement.");
8181
autocompleteRef.current = new google.maps.places.Autocomplete(inputRef.current, config);
8282

8383
if (autocompleteRef.current) {

src/usePlacesWidget.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default function usePlacesWidget(props) {
6262
if (!google.maps?.places)
6363
return console.error("Google maps places API must be loaded.");
6464

65-
if (!inputRef.current instanceof HTMLInputElement)
65+
if (!(inputRef.current instanceof HTMLInputElement))
6666
return console.error("Input ref must be HTMLInputElement.");
6767

6868
autocompleteRef.current = new google.maps.places.Autocomplete(

0 commit comments

Comments
 (0)