Skip to content

Commit

Permalink
Merge pull request #109 from Invertus/DGS-284/empty-company-name-vali…
Browse files Browse the repository at this point in the history
…daiton

DGS-284/Added additional validation if company name is empty
  • Loading branch information
GytisZum authored Oct 17, 2023
2 parents cbb5873 + 15d88fb commit 7651e92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Service/API/ShipmentApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function __construct(
public function createShipment($addressId, ShipmentData $shipmentData, $orderId)
{
$address = new Address($addressId);
$isCompany = $shipmentData->getCompany() ? true : false;
$isCompany = trim($shipmentData->getCompany()) ? true : false;
$firstName = $shipmentData->getName();
if ($isCompany) {
$firstName = $shipmentData->getCompany();
Expand Down

0 comments on commit 7651e92

Please sign in to comment.