only add culture to the preview url if the document can vary
This commit is contained in:
@@ -596,8 +596,15 @@ export class UmbDocumentWorkspaceContext
|
||||
// Tell the server that we're entering preview mode.
|
||||
await new UmbDocumentPreviewRepository(this).enter();
|
||||
|
||||
const preview = window.open(`preview?id=${unique}&culture=${culture}`, 'umbpreview');
|
||||
preview?.focus();
|
||||
const previewUrl = new URL('preview', window.location.origin);
|
||||
previewUrl.searchParams.set('id', unique);
|
||||
|
||||
if (culture && culture !== UMB_INVARIANT_CULTURE) {
|
||||
previewUrl.searchParams.set('culture', culture);
|
||||
}
|
||||
|
||||
const previewWindow = window.open(previewUrl.toString(), 'umbpreview');
|
||||
previewWindow?.focus();
|
||||
}
|
||||
|
||||
async #handleSaveAndPublish() {
|
||||
|
||||
Reference in New Issue
Block a user