Skip to content

Commit

Permalink
Empty namespace should default to file when namespaces is not all (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell authored Aug 9, 2024
1 parent 62fdd54 commit 3abadd5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Fields/BlueprintRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ private function updateOrderFromBlueprintSections($contents)

private function isEloquentDrivenNamespace(?string $namespace)
{
if (! $namespace) {
return true;
}

$eloquentNamespaces = config('statamic.eloquent-driver.blueprints.namespaces', 'all');

if ($eloquentNamespaces !== 'all') {
if (! $namespace) {
return false;
}

if (! in_array($namespace, Arr::wrap($eloquentNamespaces))) {
return false;
}
Expand Down

0 comments on commit 3abadd5

Please sign in to comment.