Commit 060757a4 authored by Tino Goratsch's avatar Tino Goratsch

minor code optimizations

parent 5eee8544
......@@ -93,15 +93,12 @@ class Redirect
*/
protected function ajax($path)
{
$return = [];
if ($this->request->isAjax() === true) {
$return = [
'redirect_url' => $path
];
return new JsonResponse($return);
$return['redirect_url'] = $path;
}
return new JsonResponse();
return new JsonResponse($return);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment