mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
Defaulting cart count to zero if undefined
This commit is contained in:
@@ -2,5 +2,7 @@ Darkswarm.factory 'CurrentOrder', (currentOrder) ->
|
||||
new class CurrentOrder
|
||||
constructor: ->
|
||||
@[k] = v for k, v of currentOrder
|
||||
@cart_count ?= 0
|
||||
|
||||
empty: =>
|
||||
@line_items.length == 0
|
||||
|
||||
Reference in New Issue
Block a user