Merge pull request #1501 from umbraco/bugfix/invariant-workspace-url
Bugfix: Invariant workspace url
This commit is contained in:
@@ -98,8 +98,14 @@ export class UmbDocumentWorkspaceEditorElement extends UmbLitElement {
|
||||
routes.push({
|
||||
path: '',
|
||||
resolve: () => {
|
||||
// Retrieve the current app language variant id from the context and redirect to the correct route.
|
||||
history.pushState({}, '', `${this.#workspaceRoute}/${this.#appCulture}/${this.#variants![0].unique}`);
|
||||
const route = routes.find((route) => route.path === this.#appCulture);
|
||||
|
||||
if (!route) {
|
||||
history.pushState({}, '', `${this.#workspaceRoute}/${routes[routes.length - 2].path}`);
|
||||
return;
|
||||
}
|
||||
|
||||
history.pushState({}, '', `${this.#workspaceRoute}/${route?.path}`);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user