fix bug in collection filtering

This commit is contained in:
Gert
2015-04-20 20:53:26 +02:00
parent 3688cfa397
commit cff4e225e6

View File

@@ -361,12 +361,13 @@ class Collection extends Iterator
{
$routable = [];
foreach (array_keys($this->items) as $path => $slug) {
foreach ($this->items as $path => $slug) {
$page = $this->pages->get($path);
if ($page->routable()) {
$routable[$path] = $slug;
}
}
$this->items = $routable;
return $this;
}