Skip to content

Commit da7714f

Browse files
authored
Merge branch 'main' into v14/chore/check-paths-in-dist-cms
2 parents a310004 + abc40e6 commit da7714f

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/external/router-slot/router-slot.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
4848
/**
4949
* Method to cancel navigation if changed.
5050
*/
51-
private _cancelNavigation ?:() => void;
51+
private _cancelNavigation?: () => void;
5252

5353
/**
5454
* Listeners on the router.
@@ -208,7 +208,7 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
208208
if (this.isConnected) {
209209
const newMatch = this.getRouteMatch();
210210
// Check if this match matches the current match (aka. If the path has changed), if so we should navigate. [NL]
211-
if(newMatch) {
211+
if (newMatch) {
212212
navigate = shouldNavigate(this.match, newMatch);
213213
}
214214
}
@@ -318,7 +318,6 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
318318
* Returns true if a navigation was made to a new page.
319319
*/
320320
protected async renderPath(path: string | PathFragment): Promise<boolean> {
321-
322321
// Notice: Since this is never called from any other place than one higher in this file(when writing this...), we could just retrieve the path and find a match by using this.getRouteMatch() [NL]
323322
// Find the corresponding route.
324323
const match = matchRoutes(this._routes, path);
@@ -336,7 +335,6 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
336335
// Only change route if its a new route.
337336
const navigate = shouldNavigate(this.match, match);
338337
if (navigate) {
339-
340338
// If another navigation is still begin resolved in this very moment, then we need to cancel that so it does not end up overriding this new navigation.[NL]
341339
this._cancelNavigation?.();
342340
// Listen for another push state event. If another push state event happens
@@ -412,7 +410,7 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
412410
// We have some routes that share the same component instance, those should not be removed and re-appended [NL]
413411
const isTheSameComponent = this.firstChild === page;
414412

415-
if(!isTheSameComponent) {
413+
if (!isTheSameComponent) {
416414
// Remove the old page by clearing the slot
417415
this.clearChildren();
418416
}
@@ -421,7 +419,7 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
421419
// We do this to ensure that we can find the match in the connectedCallback of the page.
422420
this._routeMatch = match;
423421

424-
if(!isTheSameComponent) {
422+
if (!isTheSameComponent) {
425423
if (page) {
426424
// Append the new page
427425
this.appendChild(page);

src/packages/core/section/section-sidebar/section-sidebar.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import { UmbSectionSidebarContext } from './section-sidebar.context.js';
12
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
23
import { css, html, customElement } from '@umbraco-cms/backoffice/external/lit';
34
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
4-
import { UmbSectionSidebarContext } from './section-sidebar.context.js';
55

66
@customElement('umb-section-sidebar')
77
export class UmbSectionSidebarElement extends UmbLitElement {

0 commit comments

Comments
 (0)