Skip to content

Commit

Permalink
Tidy before parsing (#4024)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurperton authored Jul 19, 2021
1 parent b52e338 commit 646793c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Stache/Stores/CollectionTreeStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Statamic\Stache\Stores;

use Statamic\Facades\Collection;
use Statamic\Facades\Path;
use Statamic\Structures\CollectionTree;
use Symfony\Component\Finder\SplFileInfo;

Expand All @@ -19,7 +20,7 @@ public function getItemFilter(SplFileInfo $file)
return false;
}

[, $handle] = $this->parseTreePath($file->getPathname());
[, $handle] = $this->parseTreePath(Path::tidy($file->getPathname()));

if (! ($collection = Collection::findByHandle($handle))) {
return false;
Expand Down

0 comments on commit 646793c

Please sign in to comment.