gatsbyjs / gatsby-starter-shopify

A Gatsby starter using the latest Shopify plugin showcasing a store with product overview, individual product pages, and a cart
https://shopify-demo.gatsbyjs.com/
BSD Zero Clause License
311 stars 137 forks source link

Fix Disabled Checkout when GATSBY_DEMO_STORE=false #4

Closed lexstefan closed 3 years ago

lexstefan commented 3 years ago

the typeof isDemoStore evaluates to string. because of this, line 113 will always evaluate to true weather the value of isDemoStore is true or false. so in order for the checkout button to NOT BE DISABLED we need to explicitly check if the value of isDemoStore is actually true

LekoArts commented 3 years ago

Thanks for the PR! The check wasn't 100% correct and I wanted to place it somewhere else so I credited you in this commit: https://github.com/gatsbyjs/gatsby-starter-shopify/commit/60fcff9119fd0eed738506921adbd7c0dcf38bb2