score:2

Accepted answer
const isEmpty = !(cart.line_items && cart.line_items.length);

Related Query

More Query from same tag