Skip to content

Commit 2e3b752

Browse files
committed
Allow fetchParams to be null to prevent fetch
1 parent a43b9df commit 2e3b752

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/make-find-mixin.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@ export default function makeFindMixin (options) {
5959
},
6060
methods: {
6161
[FIND_ACTION] (params) {
62-
const paramsToUse = params || this[FETCH_PARAMS] || this[PARAMS]
62+
let paramsToUse
63+
if (params) {
64+
paramsToUse = params
65+
} else if (this[FETCH_PARAMS] || this[FETCH_PARAMS] === null) {
66+
paramsToUse = this[FETCH_PARAMS]
67+
} else {
68+
paramsToUse = this[PARAMS]
69+
}
6370

6471
if (!this[LOCAL]) {
6572
if (typeof this[QUERY_WHEN] === 'function' ? this[QUERY_WHEN](paramsToUse) : this[QUERY_WHEN]) {

0 commit comments

Comments
 (0)