fix: in dev mode do not ask confirmation on delete

This commit is contained in:
Andras Bacsai committed 2024-10-01 09:31:01 +02:00
1 parent 31cf3294bf
commit bcc92e1f32
3 files changed
+20 -6

No files matched your search

+5 -3
View File
@@ -91,10 +91,12 @@ class Danger extends Component
public function delete($password)
{
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
if (isProduction()) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
return;
return;
}
}
if (! $this->resource) {