Skip to content

Commit

Permalink
Refactor Location order types retrieval in LocalList.php to handle nu…
Browse files Browse the repository at this point in the history
…ll values more gracefully.

Signed-off-by: Sam <6567634+sampoyigi@users.noreply.github.com>
  • Loading branch information
sampoyigi committed Jun 1, 2023
1 parent e9e9a86 commit 6548da3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/LocalList.php
Original file line number Diff line number Diff line change
@@ -196,7 +196,7 @@ protected function getOrderType()

protected function getOrderTypes()
{
return Location::current()->getOrderTypeOptions();
return optional(Location::current())->getOrderTypeOptions() ?? [];
}

protected function mapIntoObjects($collection)

0 comments on commit 6548da3

Please sign in to comment.