Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(component): do not exclude falsy types from LetDirective's input type #3460

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions modules/component/src/let/let.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ export interface LetViewContext<PO> {
*/
@Directive({ selector: '[ngrxLet]' })
export class LetDirective<PO> implements OnInit, OnDestroy {
static ngTemplateGuard_ngrxLet: 'binding';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was probably copied from NgIfDirective. It removes falsy types from the directive's input, which is not expected in the case of LetDirective.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could/want we a test for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would require the "strictTemplates" setup for tests. AFAIK, that's not possible ("angularCompilerOptions" in tsconfig.spec.json doesn't affect tests).


private isMainViewCreated = false;
private isSuspenseViewCreated = false;
private readonly viewContext: LetViewContext<PO | undefined> = {
Expand Down