Skip to content

Commit

Permalink
fix: optional logger InjectionToken
Browse files Browse the repository at this point in the history
  • Loading branch information
tFaster committed Jun 6, 2023
1 parent 90fefc2 commit 3c9d469
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
]
],
"analytics": false
},
"schematics": {
"@angular-eslint/schematics:application": {
Expand Down
2 changes: 1 addition & 1 deletion projects/stacked-panels/src/lib/logger/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { inject, InjectionToken } from '@angular/core';
export const STACKED_PANELS_LOGGER: InjectionToken<Console> = new InjectionToken<Console>('STACKED_PANELS_LOGGER');

export function injectLogger(): Console {
return inject(STACKED_PANELS_LOGGER) || console;
return inject(STACKED_PANELS_LOGGER, {optional: true}) || console;
}
2 changes: 1 addition & 1 deletion projects/stacked-panels/src/lib/stacked-panels.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ export interface StackedPanelsController {
canGoBack(): boolean;
}

export type StackedPanelTemplateOutletContext<T> = { $implicit: Panel<T>, controller: StackedPanelsController, panelId: string };
export type StackedPanelTemplateOutletContext<T> = { $implicit: Observable<T>, controller: StackedPanelsController, panelId: string, isVisible: boolean };

0 comments on commit 3c9d469

Please sign in to comment.