Skip to content

Commit

Permalink
Simplify isset check for location_lat and location_lng in getAddress …
Browse files Browse the repository at this point in the history
…method.

Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Feb 29, 2024
1 parent 89bcc82 commit 968da5b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Models/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ public static function onboardingIsComplete()
return false;
}

return isset($model->getAddress()['location_lat'])
&& isset($model->getAddress()['location_lng'])
return isset($model->getAddress()['location_lat'], $model->getAddress()['location_lng'])
&& $model->delivery_areas()->whereIsDefault()->count() > 0;
}

Expand Down

0 comments on commit 968da5b

Please sign in to comment.