Skip to content

Commit 3abadd5

Browse files
authored
Empty namespace should default to file when namespaces is not all (#336)
1 parent 62fdd54 commit 3abadd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Fields/BlueprintRepository.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,13 @@ private function updateOrderFromBlueprintSections($contents)
225225

226226
private function isEloquentDrivenNamespace(?string $namespace)
227227
{
228-
if (! $namespace) {
229-
return true;
230-
}
231-
232228
$eloquentNamespaces = config('statamic.eloquent-driver.blueprints.namespaces', 'all');
233229

234230
if ($eloquentNamespaces !== 'all') {
231+
if (! $namespace) {
232+
return false;
233+
}
234+
235235
if (! in_array($namespace, Arr::wrap($eloquentNamespaces))) {
236236
return false;
237237
}

0 commit comments

Comments
 (0)