Avoid adding the onTwigTemplatePaths if it's not enabled on this page
This commit is contained in:
parent
87c6d7eb95
commit
cdee9fa1fa
|
@ -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…
Reference in New Issue