Skip to content

Commit

Permalink
Fix bug with makeFindMixin watcher
Browse files Browse the repository at this point in the history
If you watched a single param in the watcher, it would pass the single param to the `find` action instead of passing all props.  This change makes sure no params are passed, which allows the `find` mixin to perform the proper params-picking logic, internally.
  • Loading branch information
marshallswain committed Apr 2, 2019
1 parent 227f8dd commit d1fa45b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/make-find-mixin.ts
Expand Up @@ -139,7 +139,9 @@ export default function makeFindMixin(options) {
prop = prop.replace(PARAMS, FETCH_PARAMS)
}
}
this.$watch(prop, this[FIND_ACTION])
this.$watch(prop, function() {
return this[FIND_ACTION]()
})
})

return this[FIND_ACTION]()
Expand Down

2 comments on commit d1fa45b

@J3m5
Copy link
Contributor

@J3m5 J3m5 commented on d1fa45b Apr 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! 😉

@marshallswain
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@J3m5 I thought of you when I fixed this. Thanks!

Please sign in to comment.