No fallar al vaciar storage

This commit is contained in:
f 2021-07-09 19:05:53 -03:00
parent 30028361b7
commit 11e7d7288d

View file

@ -23,7 +23,7 @@ export default class extends CartBaseController {
*/
subscribe () {
window.addEventListener('storage', async event => {
if (!event.key.startsWith('cart:item:')) return
if (!event.key?.startsWith('cart:item:')) return
const products = this.products
const site = await this.site()