Shopify / storefront-api-examples

Example custom storefront applications built on Shopify's Storefront API
https://help.shopify.com/api/storefront-api
MIT License
1.12k stars 329 forks source link

Fix error#109 #110

Open ryangrunest opened 4 years ago

ryangrunest commented 4 years ago

Changes start in line 126 in the addVariantToCart() function.

ryangrunest commented 4 years ago

Fix for https://github.com/Shopify/storefront-api-examples/issues/109

swalkinshaw commented 4 years ago

Thanks @ryangrunest. Is it possible to just get the necessary changes in here? It's really hard to tell what the actual fix is vs other changes.

enkelmedia commented 3 years ago

The diff is impossible to read, what did you change to get this to work?

enkelmedia commented 3 years ago

Ahh, L128, just adding const client = this.props.client;

From:

addVariantToCart(variantId, quantity){
    ...
}

To:

addVariantToCart(variantId, quantity){
    const client = this.props.client;
    ...
}
enkelmedia commented 3 years ago

@swalkinshaw can you just fix this or do you want a new PR?

swalkinshaw commented 3 years ago

I can't push commits to his branch, so if you want to do a new PR then that would be helpful 👍

enkelmedia commented 3 years ago

PR here: https://github.com/Shopify/storefront-api-examples/pull/130