Skip to content

Commit d240cba

Browse files
committed
fix error when paramsToUse in null in makeFindMixin
With the `makeFindMixin`, the user is allowed to pass `null` as the params in order to prevent a query from being made. An error would occur when returning `null` as the `fetchParams`. This guards against trying to set an attribute on `null`.
1 parent 250901d commit d240cba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/make-find-mixin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export default function makeFindMixin(options) {
247247
params: this[PARAMS],
248248
fetchParams: this[FETCH_PARAMS]
249249
})
250-
if (paramsToUse.debounce) {
250+
if (paramsToUse && paramsToUse.debounce) {
251251
this[IS_FIND_PENDING] = true
252252
}
253253
return this[`${FIND_ACTION}DebouncedProxy`]()

0 commit comments

Comments
 (0)