From eddc377e3ab1c94070559f78f40cf1ed9484edae Mon Sep 17 00:00:00 2001 From: 4taras4 <4taras4@gmail.com> Date: Mon, 23 Jan 2023 14:51:04 +0200 Subject: [PATCH] Fix country picker by id (#601) --- PhoneNumberKit/PartialFormatter.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhoneNumberKit/PartialFormatter.swift b/PhoneNumberKit/PartialFormatter.swift index 91bc356..452988d 100644 --- a/PhoneNumberKit/PartialFormatter.swift +++ b/PhoneNumberKit/PartialFormatter.swift @@ -43,7 +43,7 @@ public final class PartialFormatter { func updateMetadataForDefaultRegion() { guard let metadataManager = metadataManager else { return } if let regionMetadata = metadataManager.filterTerritories(byCountry: defaultRegion) { - self.defaultMetadata = metadataManager.mainTerritory(forCode: regionMetadata.countryCode) + self.defaultMetadata = regionMetadata } else { self.defaultMetadata = nil }