Skip to content

Commit

Permalink
Update HasUnsavedChangesAlerts.php
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Jan 15, 2024
1 parent ff58006 commit 04d25da
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ public function unsavedChangesAlerts(bool | Closure $condition = true): static

public function hasUnsavedChangesAlerts(): bool
{
if ($this->hasSpaMode()) {
$hasAlerts = (bool) $this->evaluate($this->hasUnsavedChangesAlerts);

if ($hasAlerts && $this->hasSpaMode()) {
throw new Exception('Unsaved changes alerts are not supported in SPA mode.');
}

return (bool) $this->evaluate($this->hasUnsavedChangesAlerts);
return $hasAlerts;
}
}

0 comments on commit 04d25da

Please sign in to comment.