Merge pull request #2239 from pine3ree/patch-3

simplify code using !empty
This commit is contained in:
Robbie Averill 2018-08-18 09:28:15 +12:00 committed by GitHub
commit eae155a228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -435,8 +435,8 @@ HTML;
public function getViewer($action)
{
// Manually set templates should be dealt with by Controller::getViewer()
if (isset($this->templates[$action]) && $this->templates[$action]
|| (isset($this->templates['index']) && $this->templates['index'])
if (!empty($this->templates[$action])
|| !empty($this->templates['index'])
|| $this->template
) {
return parent::getViewer($action);