Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfkaya committed Aug 10, 2024
1 parent 1e7631e commit 83edde7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Forms/PhoneInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function (PhoneInput $component, string $statePath) {

protected function phoneFormat($state, $country, $format)
{
$country ??= $this->getDefaultCountry();
$country ??= $this->getDefaultCountry() ?? [];

$instance = phone(number: $state, country: $country);

Expand Down Expand Up @@ -242,7 +242,7 @@ public function defaultCountry(string | Closure $value): static
return $this;
}

public function getDefaultCountry(): string
public function getDefaultCountry(): ?string
{
return $this->evaluate($this->defaultCountry);
}
Expand Down

0 comments on commit 83edde7

Please sign in to comment.