Skip to content

Commit 41c5df0

Browse files
committed
Safely handle new array key
1 parent 0fbfedf commit 41c5df0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/FilamentExport.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ public static function createExportUrlUsing(Closure $closure): void
2121
protected function sendDatabaseNotification(array $export, string $url): void
2222
{
2323
$previousLocale = app()->getLocale();
24-
app()->setLocale($export['locale']);
24+
25+
if (isset($export['locale'])) {
26+
app()->setLocale($export['locale']);
27+
}
2528

2629
Notification::make(data_get($export, 'id'))
2730
->title(__('filament-excel::notifications.download_ready.title'))

0 commit comments

Comments
 (0)