No fallar al vaciar storage
This commit is contained in:
parent
30028361b7
commit
11e7d7288d
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue