Skip to content

Commit 3c86ef2

Browse files
authored
Only hydrate Cascade content if the Cascade is used (#19)
1 parent f97d4a7 commit 3c86ef2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"require": {
3737
"php": "^8.2",
3838
"laravel/framework": "^11.0 || ^12.0",
39-
"statamic/cms": "^5.17.0 || ^6.0",
39+
"statamic/cms": "^5.73.0 || ^6.0",
4040
"livewire/livewire": "^3.6.4 || ^4.0"
4141
},
4242
"extra": {

src/Http/Middleware/HydrateCascadeByLivewireUrl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ protected function hydrateRequest(): void
3939

4040
protected function hydrateContent(): void
4141
{
42-
Cascade::withContent(Data::findByRequestUrl(Livewire::originalUrl()));
42+
Cascade::withContent(fn () => Data::findByRequestUrl(Livewire::originalUrl()));
4343
}
4444
}

0 commit comments

Comments
 (0)