diff --git a/src/Twig/TerrificCompiler.php b/src/Twig/TerrificCompiler.php index 629dd2d..5a49233 100644 --- a/src/Twig/TerrificCompiler.php +++ b/src/Twig/TerrificCompiler.php @@ -45,6 +45,7 @@ class TerrificCompiler implements TerrificCompilerInterface { */ protected function __construct(Compiler $compiler) { $this->compiler = $compiler; + $this->expressionHandler = ExpressionHandler::create(); } /** @@ -195,10 +196,6 @@ public function compileAndMergeVariableToContext(VariableNameAndArrayKeysPair $v * The expression handler. */ public function getExpressionHandler(): ExpressionHandler { - if (!$this->expressionHandler instanceof ExpressionHandler) { - $this->expressionHandler = ExpressionHandler::create(); - } - return $this->expressionHandler; }