File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -16,16 +16,12 @@ public function register(): void
1616 }
1717
1818 /** Injects assets inside every full-page response */
19- public function handle (RequestHandled $ handled )
19+ public function handle (RequestHandled $ handled ): void
2020 {
2121 $ identifier = 'NativePHP Livewire Dispatcher ' ;
2222 $ html = $ handled ->response ->getContent ();
2323 $ originalContent = $ handled ->response ->original ?? null ;
2424
25- if (! $ originalContent ) {
26- return ;
27- }
28-
2925 if (! $ handled ->response ->isSuccessful ()) {
3026 return ;
3127 }
@@ -54,7 +50,9 @@ public function handle(RequestHandled $handled)
5450 HTML )
5551 );
5652
57- $ handled ->response ->original = $ originalContent ;
53+ if (property_exists ($ handled ->response , 'original ' )) {
54+ $ handled ->response ->original = $ originalContent ;
55+ }
5856 }
5957
6058 /** Injects assets into given html string (taken from Livewire's injection mechanism) */
You can’t perform that action at this time.
0 commit comments