Avoid adding the onTwigTemplatePaths if it's not enabled on this page
This commit is contained in:
parent
87c6d7eb95
commit
cdee9fa1fa
1 changed files with 5 additions and 4 deletions
|
@ -103,12 +103,13 @@ class CommentsPlugin extends Plugin
|
|||
|
||||
$this->calculateEnable();
|
||||
|
||||
$this->enable([
|
||||
'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0],
|
||||
]);
|
||||
if ($this->enable) {
|
||||
$this->enable([
|
||||
'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0],
|
||||
]);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
/** @var Uri $uri */
|
||||
$uri = $this->grav['uri'];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue