Merge pull request #2459 from sevannerse/delete-button

type check for route parameter
This commit is contained in:
Cüneyt Şentürk 2022-06-15 08:22:31 +03:00 committed by GitHub
commit bd201a2da9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,7 +200,15 @@ class DeleteButton extends Component
$page = '';
if (! empty($this->route)) {
$page = explode('.', $this->route)[0];
if (! is_array($this->route)) {
$string = $this->route;
}
if (is_array($this->route)) {
$string = $this->route[0];
}
$page = explode('.', $string)[0];
} elseif (! empty($this->url)) {
$page = explode('/', $this->url)[1];
}