@@ -30,7 +30,7 @@ protected function registerViews()
30
30
protected function registerAlertMacro ()
31
31
{
32
32
Component::macro ('alert ' , function ($ type = 'success ' , $ message = '' , $ options = []) {
33
- $ options = array_merge (config ('livewire-alert.alert ' ), $ options );
33
+ $ options = array_merge (config ('livewire-alert.alert ' ) ?? [] , $ options );
34
34
35
35
$ this ->dispatchBrowserEvent ('alert ' , [
36
36
'type ' => $ type ,
@@ -43,7 +43,7 @@ protected function registerAlertMacro()
43
43
public function registerFlashMacro ()
44
44
{
45
45
Component::macro ('flash ' , function ($ type = 'success ' , $ message = '' , $ options = []) {
46
- $ options = array_merge (config ('livewire-alert.alert ' ), $ options );
46
+ $ options = array_merge (config ('livewire-alert.alert ' ) ?? [] , $ options );
47
47
48
48
session ()->flash ('livewire-alert ' , [
49
49
'type ' => $ type ,
@@ -56,7 +56,7 @@ public function registerFlashMacro()
56
56
public function registerConfirmMacro ()
57
57
{
58
58
Component::macro ('confirm ' , function ($ title , $ options = []) {
59
- $ options = array_merge (config ('livewire-alert.confirm ' ), $ options );
59
+ $ options = array_merge (config ('livewire-alert.confirm ' ) ?? [] , $ options );
60
60
61
61
$ identifier = (string ) Str::uuid ();
62
62
0 commit comments