diff --git a/src/Extensions/ElementDocumentGeneratorExtension.php b/src/Extensions/ElementDocumentGeneratorExtension.php index ac35325..d4cefb8 100644 --- a/src/Extensions/ElementDocumentGeneratorExtension.php +++ b/src/Extensions/ElementDocumentGeneratorExtension.php @@ -52,7 +52,9 @@ public function makeSearchDocumentForPage() /* @var $element BaseElement */ $element = $this->owner; $page = $element->getPage(); - self::make_document_for($page); + if($page) { + self::make_document_for($page); + } } }