Skip to content

Commit 2069d35

Browse files
committed
fix: log error if no onError prop is provided
this makes the error visible insteaf of just swallowing it
1 parent c80d419 commit 2069d35

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/autocomplete/autocomplete.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ export default ({
116116
setIsLoading(false) // hide loading indicator as this normally happens after a successful request
117117
if (typeof userOnError === 'function') {
118118
userOnError(error)
119+
} else {
120+
console.error(error)
119121
}
120122
}
121123

0 commit comments

Comments
 (0)