Skip to content

Commit ef682f7

Browse files
committed
Fix watcher for makeGetMixin
The watcher in the makeGetMixin was calling the GET_ACTION with the params, which was effectively setting the params as the id for the query. Naturally, some really weird errors were showing up on the API server. This makes sure the watcher doesn’t call the GET_ACTION with any params, allowing the GET_ACTION to perform its param-choosing logic.
1 parent 78a2dfb commit ef682f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/make-get-mixin.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ export default function makeFindMixin(options) {
136136
prop.replace(PARAMS, FETCH_PARAMS)
137137
}
138138
}
139-
this.$watch(prop, this[GET_ACTION])
139+
this.$watch(prop, function () {
140+
return this[GET_ACTION]()
141+
})
140142
})
141143

142144
return this[GET_ACTION]()

0 commit comments

Comments
 (0)