RobertSpread / spreadcart

simple plugin to display a cart for the spreadshop everywhere on your domain
1 stars 1 forks source link

Errors because basket data missing before cookies are set #14

Closed jtlapp closed 8 years ago

jtlapp commented 8 years ago

If you clear all cookies and load a page containing our shopping cart plugin, you will get a JS error due to basketData being null. If you fix that error, you get another one downstream for basketData being null. If you fix that one, you get another such error. And so on.

I'm looking into how we should deal with things before basket data has been put in local storage.

jtlapp commented 8 years ago

Okay, I've got a fix. The fix actually simplifies a good amount of code -- fewer getBasketData() calls.

jtlapp commented 8 years ago

The fixes are in my basket-icon-fixes pull request.

jtlapp commented 8 years ago

Resolved in pull jtlapp/basket-icon-fixes