From 11e7d7288df30cc1da2d53d5142193e938fe6e08 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 9 Jul 2021 19:05:53 -0300 Subject: [PATCH] No fallar al vaciar storage --- _packs/controllers/order_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_packs/controllers/order_controller.js b/_packs/controllers/order_controller.js index dea675f..5e8edb6 100644 --- a/_packs/controllers/order_controller.js +++ b/_packs/controllers/order_controller.js @@ -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()