You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 10, 2018. It is now read-only.
When an app is compiled via AOT compilation, the default state values are not set at all, and one gets undefined when trying to fetch them from the store - this is a regression caused somewhere in between Angular 2.2 and 2.4. This may potentially be an Angular bug at its root, but I only came across it with this library so perhaps someone can do a deeper dive (unfortunately I don't get to do much coding anymore :( ).
Here is a snippet of the problematic code & the workaround
It should be noted that I encountered this because I noticed that the store was returning undefined for the slides value being fetched like this.store.select(s => s.slides).subscribe(slides => ...), which caused catastrophic failure in the app.
When an app is compiled via AOT compilation, the default state values are not set at all, and one gets
undefined
when trying to fetch them from the store - this is a regression caused somewhere in between Angular 2.2 and 2.4. This may potentially be an Angular bug at its root, but I only came across it with this library so perhaps someone can do a deeper dive (unfortunately I don't get to do much coding anymore :( ).Here is a snippet of the problematic code & the workaround
It should be noted that I encountered this because I noticed that the store was returning
undefined
for theslides
value being fetched likethis.store.select(s => s.slides).subscribe(slides => ...)
, which caused catastrophic failure in the app.Angular version: 2.4.7
@ngtools/webpack: 1.2.9
@ngrx/store: 2.2.1
The text was updated successfully, but these errors were encountered: