Browse Source

refactor(dynamic-layout): remove non-null assertion

pull/23458/head
Maik Stegemann 1 year ago
parent
commit
4d5da6e71c
  1. 2
      npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts

2
npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts

@ -41,7 +41,7 @@ export class DynamicLayoutComponent {
protected readonly environment = inject(EnvironmentService); protected readonly environment = inject(EnvironmentService);
constructor() { constructor() {
const dynamicLayoutComponent = inject(DynamicLayoutComponent, { optional: true, skipSelf: true })!; const dynamicLayoutComponent = inject(DynamicLayoutComponent, { optional: true, skipSelf: true });
if (dynamicLayoutComponent) { if (dynamicLayoutComponent) {
if (isDevMode()) console.warn('DynamicLayoutComponent must be used only in AppComponent.'); if (isDevMode()) console.warn('DynamicLayoutComponent must be used only in AppComponent.');

Loading…
Cancel
Save