We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f7d82b commit c80d419Copy full SHA for c80d419
src/autocomplete/autocomplete.js
@@ -44,10 +44,14 @@ export default ({
44
// deep compare is used to to only instantiate a new autocomplete API client if
45
// required properties for it change
46
useDeepCompareEffect(() => {
47
- autocomplete.current = createAutocomplete(apiKey, params, {
48
- ...options,
49
- client: `ge-autocomplete${typeof VERSION !== 'undefined' ? `-${VERSION}` : ''}`
50
- })
+ try {
+ autocomplete.current = createAutocomplete(apiKey, params, {
+ ...options,
+ client: `ge-autocomplete${typeof VERSION !== 'undefined' ? `-${VERSION}` : ''}`
51
+ })
52
+ } catch (err) {
53
+ onError(err)
54
+ }
55
}, [apiKey, params, options])
56
57
// search queries the autocomplete API
0 commit comments