File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -242,9 +242,7 @@ public function run(Application\Request $request): Application\IResponse
242242 }
243243
244244 // finish template rendering
245- if ($ this ->getTemplate ()) {
246- $ this ->sendTemplate ();
247- }
245+ $ this ->sendTemplate ();
248246
249247 } catch (Application \AbortException $ e ) {
250248 }
@@ -445,12 +443,11 @@ public function setLayout($layout)
445443
446444
447445 /**
448- * @throws Nette\Application\BadRequestException if no template found
449446 * @throws Nette\Application\AbortException
450447 */
451- public function sendTemplate (): void
448+ public function sendTemplate (ITemplate $ template = null ): void
452449 {
453- $ template = $ this ->getTemplate ();
450+ $ template = $ template ?: $ this ->getTemplate ();
454451 if (!$ template ->getFile ()) {
455452 $ files = $ this ->formatTemplateFiles ();
456453 foreach ($ files as $ file ) {
You can’t perform that action at this time.
0 commit comments