Compare commits
2 Commits
0588e3a409
...
141043d219
Author | SHA1 | Date |
---|---|---|
Tony Air | 141043d219 | |
Tony Air | a6d9d432a6 |
|
@ -207,9 +207,11 @@ class AjaxControllerEx extends Extension
|
|||
$url = $req->getURL();
|
||||
$url = $url === 'home' ? '/' : $url;
|
||||
|
||||
$ajax_res = $ctrl->config()->get('ajax_resources');
|
||||
$graphql_res = $ctrl->config()->get('graphql_resources');
|
||||
$resources = array_merge(
|
||||
$ctrl->config()->get('graphql_resources'),
|
||||
$ctrl->config()->get('ajax_resources')
|
||||
$ajax_res ? $ajax_res : [],
|
||||
$graphql_res ? $graphql_res : []
|
||||
);
|
||||
|
||||
$body = $response->getBody();
|
||||
|
@ -259,7 +261,7 @@ class AjaxControllerEx extends Extension
|
|||
}
|
||||
|
||||
// render page
|
||||
if (!self::isJson($body)) {
|
||||
if ($body && !self::isJson($body)) {
|
||||
$body = json_encode([
|
||||
'ID' => $record->ID,
|
||||
'Title' => $record->Title,
|
||||
|
|
Loading…
Reference in New Issue