Skip to content

Commit ebf89fa

Browse files
authored
Merge pull request #118 from ryanmortier/patch-1
Update Map.php to allow defaultLocation() on edit and view pages
2 parents 9b7eec2 + 32f17ab commit ebf89fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Fields/Map.php

+4
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,10 @@ public function getState(): mixed
837837
$state = parent::getState();
838838

839839
if (is_array($state)) {
840+
if (empty(array_filter($state))) {
841+
return $this->getDefaultLocation();
842+
}
843+
840844
return $state;
841845
} else {
842846
try {

0 commit comments

Comments
 (0)