diff --git a/src/Api/CMSEditLinkAPI.php b/src/Api/CMSEditLinkAPI.php index 56676c4..83d481b 100644 --- a/src/Api/CMSEditLinkAPI.php +++ b/src/Api/CMSEditLinkAPI.php @@ -140,12 +140,12 @@ protected static function getModelAdmin(string $modelNameToEdit) : array } } } - } - if($classFound && $modelNameToEdit && $myModelAdminclassObject) { - self::$_cache[$originalModelNameToEdit] = [ - 'ModelNameToEdit' => $modelNameToEdit, - 'MyModelAdminclassObject' => $myModelAdminclassObject, - ]; + if($classFound && $modelNameToEdit && $myModelAdminclassObject) { + self::$_cache[$originalModelNameToEdit] = [ + 'ModelNameToEdit' => $modelNameToEdit, + 'MyModelAdminclassObject' => $myModelAdminclassObject, + ]; + } } return self::$_cache[$originalModelNameToEdit]; }