I am very close to this but having an issue check below
{{get_items_in_cart.data.totalCost[0].temp_cart_quantity==0 ? browser_empty_cart.goto('index.php') : console.log('')}}
The issue is that if ‘get_items_in_cart.data.totalCost[0].temp_cart_quantity’ has no value it just disappears, I mean I can not compare it, it does not exist. How can I check this? If for example I use this
{{get_items_in_cart.data.totalCost[0].temp_cart_quantity==1 ? browser_empty_cart.goto('index.php') : console.log('')}}
when quanity ==1, it works. How can I check when it is =0, since there is no quantity the get_items_in_cart.data.totalCost[0].temp_cart_quantity becomes empty, not 0.
I also tried get_items_in_cart.data.totalCost[0].temp_cart_quantity==false or get_items_in_cart.data.totalCost[0].temp_cart_quantity!= true , with no luck.
Thank you