mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-05 15:37:06 +02:00
Fixed regression: Do not require Flex Objects plugin [grav#2653]
This commit is contained in:
@@ -1151,7 +1151,7 @@ class Admin
|
||||
public function latestPages($count = 10)
|
||||
{
|
||||
/** @var Flex $flex */
|
||||
$flex = $this->grav['flex_objects'];
|
||||
$flex = $this->grav['flex_objects'] ?? null;
|
||||
$directory = $flex ? $flex->getDirectory('grav-pages') : null;
|
||||
if ($directory) {
|
||||
return $directory->getIndex()->sort(['timestamp' => 'DESC'])->slice(0, $count);
|
||||
|
||||
Reference in New Issue
Block a user