mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix live preview target URL with search parameters (#22255)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
This commit is contained in:
5
.changeset/long-toes-pull.md
Normal file
5
.changeset/long-toes-pull.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@directus/app': patch
|
||||
---
|
||||
|
||||
Fixed an endless refresh loop in the live preview of an item accessed through a bookmarked view
|
||||
@@ -257,7 +257,8 @@ watch(
|
||||
return;
|
||||
}
|
||||
|
||||
const targetUrl = window.location.href + (window.location.href.endsWith('/') ? 'preview' : '/preview');
|
||||
const targetUrl = new URL(window.location.href);
|
||||
targetUrl.pathname += targetUrl.pathname.endsWith('/') ? 'preview' : '/preview';
|
||||
|
||||
popupWindow = window.open(
|
||||
targetUrl,
|
||||
|
||||
Reference in New Issue
Block a user