Skip to content

Commit

Permalink
fix(uve): Fixed iframeURL selector on store (#31470)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinDavilaDotCMS and kevindaviladev authored Feb 25, 2025
1 parent a3f9b7f commit 2bce2be
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,15 @@ export function withEditor() {
};
}),
$iframeURL: computed<string | InstanceType<typeof String>>(() => {
const sanitizedURL = sanitizeURL(store.pageParams().url);
/*
Here we need to import pageAPIResponse() to create the computed dependency and have it updated every time a response is received from the PageAPI.
This should change in future UVE improvements.
The url should not depend on the PageAPI response since it does not change (In traditional).
In the future we should have a function that updates the content, independent of the url.
More info: https://github.com/dotCMS/core/issues/31475
*/
const vanityURL = store.pageAPIResponse().vanityUrl?.url;
const sanitizedURL = sanitizeURL(vanityURL ?? store.pageParams().url);

const url = buildIframeURL({
url: sanitizedURL,
Expand Down

0 comments on commit 2bce2be

Please sign in to comment.