Skip to content

Commit

Permalink
change inst to BaseElement instead of SiteTree
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder-somar committed Oct 9, 2023
1 parent 56cef26 commit 6882b19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Control/ElementFormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace DNADesign\ElementalUserForms\Control;

use DNADesign\Elemental\Models\BaseElement;
use DNADesign\Elemental\Controllers\ElementController;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\UserForms\Control\UserDefinedFormController;
use SilverStripe\UserForms\Form\UserForm;
use SilverStripe\CMS\Model\SiteTree;

class ElementFormController extends ElementController
{
Expand Down Expand Up @@ -61,7 +61,7 @@ public function finished()
return null;
}

while (!$page instanceof SiteTree) {
while ($page instanceof BaseElement) {
$page = $page->getPage();

if ($page === null) {
Expand Down

0 comments on commit 6882b19

Please sign in to comment.