Skip to content

Commit

Permalink
Fix bard text triming when CP is on root URL
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksleight committed Nov 15, 2024
1 parent 5796759 commit 0d7f1f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ public function boot()
return optional($this->statamicToken())->handler() === LivePreview::class;
});

TrimStrings::skipWhen(fn (Request $request) => $request->is(config('statamic.cp.route').'/*'));
TrimStrings::skipWhen(function (Request $request) {
$route = config('statamic.cp.route');

return ! $route || $request->is($route.'/*');
});

$this->addAboutCommandInfo();

Expand Down

0 comments on commit 0d7f1f0

Please sign in to comment.