diff --git a/classes/Twig/JSCommentsTwigExtension.php b/classes/Twig/JSCommentsTwigExtension.php index d9fcbf1..453bf1b 100644 --- a/classes/Twig/JSCommentsTwigExtension.php +++ b/classes/Twig/JSCommentsTwigExtension.php @@ -78,7 +78,7 @@ public function funcJSComments($provider = null, $params = []) // Populate JScomments settings $vars = isset($page->header()->jscomments) ? $page->header()->jscomments : []; - $vars = array_replace_recursive($vars, $params); + $vars = array_replace_recursive($vars, $params, ['page' => $page]); // Validate presence of header value if (!$provider) {