-
Notifications
You must be signed in to change notification settings - Fork 27.1k
@for with async - Object is possible null #51993
Copy link
Copy link
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimebugcore: control flowIssues related to the built-in control flow (@if, @for, @switch)Issues related to the built-in control flow (@if, @for, @switch)state: has PR
Milestone
Description
Which @angular/* package(s) are the source of the bug?
compiler
Is this a regression?
Yes
Description
I tried using the new control flow with the async pipe and got the err that the Object is possible 'null'. Voucher$ is a simple array in combination with of(arr)
@for (v of vouchers$ | async; track v) {
<tr>
<td>{{ v.ID }}</td>
</tr>
}
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
[ERROR] NG1: Object is possibly 'null'. [plugin angular-compiler]
Please provide the environment you discovered this bug in (run ng version)
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 17.0.0-next.6
Node: 18.17.1
Package Manager: npm 9.6.7
OS: win32 x64
Angular: 17.0.0-next.6
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1700.0-next.6
@angular-devkit/build-angular 17.0.0-next.6
@angular-devkit/core 17.0.0-next.6
@angular-devkit/schematics 17.0.0-next.6
@angular/cdk 17.0.0-next.5
@angular/fire 7.6.1
@angular/material 17.0.0-next.5
@schematics/angular 17.0.0-next.6
rxjs 7.8.1
typescript 5.2.2
zone.js 0.14.0
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimebugcore: control flowIssues related to the built-in control flow (@if, @for, @switch)Issues related to the built-in control flow (@if, @for, @switch)state: has PR