From fd20ff358ece8bc34177c2bf49023c60de0dc301 Mon Sep 17 00:00:00 2001 From: Loz Calver Date: Mon, 24 Jun 2024 10:53:18 +0100 Subject: [PATCH] fix: error when visiting 'Groups' tab in security --- src/Extensions/SecurityAdminExtension.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Extensions/SecurityAdminExtension.php b/src/Extensions/SecurityAdminExtension.php index 540d8f4..2777f75 100644 --- a/src/Extensions/SecurityAdminExtension.php +++ b/src/Extensions/SecurityAdminExtension.php @@ -13,6 +13,9 @@ public function updateEditForm(Form $form) { /** @var GridField $gridField */ $gridField = $form->Fields()->dataFieldByName('users'); + if (!$gridField) { + return; + } $gridField->getConfig() ->addComponent(new GridFieldMasqueradeButton()); }