check for blueprints method

This commit is contained in:
Andy Miller
2018-05-22 14:25:37 -06:00
parent 89c8929bf8
commit 43ffcbf7e3
2 changed files with 4 additions and 1 deletions

View File

@@ -5,6 +5,8 @@
* Added custom object support for filepicker field
* Don't allow saving of a user with no local account file
* Controls for `list` field were not in sync between top and bottom
1. [](#bugfix)
* Check
# v1.8.1
## 05/15/2018

View File

@@ -762,7 +762,8 @@ class AdminPlugin extends Plugin
{
// Special case to redirect after changing the admin route to avoid 'breaking'
$obj = $event['object'];
if (null !== $obj) {
if (null !== $obj && method_exists($obj, 'blueprints')) {
$blueprint = $obj->blueprints()->getFilename();
if ($blueprint === 'admin/blueprints' && isset($obj->route) && $this->admin_route !== $obj->route) {