Skip to content

Commit

Permalink
FIX #80 check $gridField exists before calling getConfig()
Browse files Browse the repository at this point in the history
  • Loading branch information
dizzystuff committed May 23, 2023
1 parent 7c7fe54 commit bbfeb2d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Extensions/UserFormUseQueuedExportExtension.php
Expand Up @@ -15,6 +15,7 @@ class UserFormUseQueuedExportExtension extends DataExtension
public function updateCMSFields(FieldList $fields)
{
$gridField = $fields->fieldByName('Root.Submissions.Submissions');
if (empty($gridField)) return;

$config = $gridField->getConfig();
$oldExportButton = $config->getComponentByType(GridFieldExportButton::class);
Expand Down

0 comments on commit bbfeb2d

Please sign in to comment.