Skip to content

Commit

Permalink
fix: feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Ernst authored and myparcel-bot[bot] committed Oct 27, 2023
1 parent 62d3fb7 commit 38d31d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Frontend/View/CarrierSettingsItemView.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,9 @@ function (FormOperationBuilder $builder) {
*/
private function getExportInsuranceFields(): array
{
return [
$insuranceAmounts = $this->carrierSchema->getAllowedInsuranceAmounts();

return count($insuranceAmounts) > 1 ? [
new InteractiveElement(CarrierSettings::EXPORT_INSURANCE, Components::INPUT_TOGGLE),

$this->withOperation(
Expand All @@ -429,7 +431,7 @@ function (FormOperationBuilder $builder) {
]
)
),
];
] : [];
}

/**
Expand Down

0 comments on commit 38d31d0

Please sign in to comment.