Skip to content

Commit eba1291

Browse files
committed
No liveprops no change
1 parent 1f90d60 commit eba1291

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/LiveComponent/src/EventListener/LiveUrlSubscriber.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ public function onKernelResponse(ResponseEvent $event): void
4545
$newLiveUrl = null;
4646
if ($previousLiveUrl = $request->headers->get(self::URL_HEADER)) {
4747
$liveProps = $this->getLivePropsFromRequest($request);
48+
if ([] === $liveProps['path'] && [] === $liveProps['query']) {
49+
// If there are no live props, we don't need to change the URL
50+
return;
51+
}
52+
4853
$newLiveUrl = $this->urlFactory->createFromPreviousAndProps($previousLiveUrl, $liveProps['path'], $liveProps['query']);
4954
}
5055

0 commit comments

Comments
 (0)