Skip to content

Commit 96022c9

Browse files
committed
Do not check for is file in template handling
1 parent c2a8f39 commit 96022c9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Cortex/Router/ResultHandler.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,14 @@ private function setTemplate($template)
9393
$template = is_file($template) ? $template : locate_template([$template], false);
9494
$template or $template = null;
9595
}
96-
97-
// Allow template to be a file path or `false`, which will actually disable template
98-
if (! is_file($template) && $template !== false) {
96+
97+
if (is_null($template)) {
9998
return;
10099
}
101100

102101
// If template is `false`, we return `true` on `"{$type}_template"`
103102
// to speed up `template-loader.php`
104-
$template_setter = $template
103+
$template_setter = $template !== false
105104
? function () use ($template) {
106105
return $template;
107106
}

0 commit comments

Comments
 (0)