File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public function status()
6161 public function downloads (): LineItems
6262 {
6363 return $ this ->data ->lineItems ()
64- ->filter (fn (LineItem $ lineItem ) => $ lineItem ->variant ()?->has('downloads ' ) ?? $ lineItem ->product ()->has ('downloads ' ))
64+ ->filter (fn (LineItem $ lineItem ) => $ lineItem ->variant ()?->has('downloads ' ) ?? $ lineItem ->product ()? ->has('downloads ' ))
6565 ->map (fn (LineItem $ lineItem ) => [
6666 'product ' => $ lineItem ->product (),
6767 'variant ' => $ lineItem ->variant (),
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ public function total($total = null)
130130
131131 public function hasDownloads (): bool
132132 {
133- return $ this ->variant ()?->has('downloads ' ) ?? $ this ->product ()->has ('downloads ' );
133+ return $ this ->variant ()?->has('downloads ' ) ?? $ this ->product ()? ->has('downloads ' ) ?? false ;
134134 }
135135
136136 public function defaultAugmentedArrayKeys ()
You can’t perform that action at this time.
0 commit comments