vue-storefront
vue-storefront copied to clipboard
[Bug]: Misleading name of param in useWishlistFactory
trafficstars
Describe the Bug
The name of a param in removeItem action in UseWishlistFactoryParams interface is misleading.
removeItem: (
context: Context,
params: {
currentWishlist: WISHLIST;
product: WISHLIST_ITEM;
customQuery?: CustomQuery;
}) => Promise<WISHLIST>;
product param is type WISHLIST_ITEM, so better name would be wishlistItem to not confuse it with product used in other actions of useWishlistFactoryParams.
Current behavior
removeItem param name for item of the wishlist is product and the type is WISHLIST_ITEM.
Expected behavior
Change the name of the param to more actual one like wishlistItem
Steps to reproduce
https://github.com/vuestorefront/vue-storefront/blob/main/packages/core/core/src/factories/useWishlistFactory.ts 23 line.
What version of Vue Storefront are you using?
2.3.4
What version of Node.js are you using?
n/a
What browser (and version) are you using?
n/a
What operating system (and version) are you using?
n/a
Relevant log output
No response
Able to fix / change the documentation?
- [X] Yes
- [ ] No
Code of Conduct
- [X] I agree to follow this project's Code of Conduct