Skip to content

Commit b1fed09

Browse files
authored
Delegate rendering to environment (#92)
1 parent 37a4520 commit b1fed09

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/TwigRenderer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ public function renderString($templateString, array $data = [])
7777
public function render(string $templatePath, array $data = [])
7878
{
7979
try {
80-
$template = $this->twigEnvironment->load($templatePath);
81-
$html = $template->render($data);
80+
$html = $this->twigEnvironment->render($templatePath, $data);
8281
$response = [
8382
'ok' => true,
8483
'html' => trim((string) $html),

0 commit comments

Comments
 (0)