Skip to content

Commit 6f9a6aa

Browse files
authored
Merge pull request #290 from JarJak/patch-1
Fix City constructor from empty subdivisions
2 parents 5881b30 + a0ba16c commit 6f9a6aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Model/City.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function __construct(array $raw, array $locales = ['en'])
7272
$this->location = new Location($raw['location'] ?? []);
7373
$this->postal = new Postal($raw['postal'] ?? []);
7474

75-
if (!isset($raw['subdivisions'])) {
75+
if (empty($raw['subdivisions'])) {
7676
$this->subdivisions = [];
7777
$this->mostSpecificSubdivision
7878
= new Subdivision([], $locales);

0 commit comments

Comments
 (0)