-
Notifications
You must be signed in to change notification settings - Fork 406
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(store): show error when state initialization order is invalid #2066
Conversation
This commit adds a `console.error` when the `UpdateState` is dispatched before the `InitState`. This typically indicates that the state initialization order is invalid and must be updated to ensure that states are initialized in the correct order. The incorrect order may prevent `ngxsOnInit` from being called on feature states or lead to other unpredictable errors.
BundleMon (Integration Projects)Unchanged files (1)
Total files change +3B 0% Final result: ✅ View report in BundleMon website ➡️ |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit c1a08af. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 3 targetsSent with 💌 from NxCloud. |
Code Climate has analyzed commit 651fb3a and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 95.5% (0.0% change). View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add to the change log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This commit adds a
console.error
when theUpdateState
is dispatched before theInitState
. This typically indicates that the state initialization order is invalid and must be updated to ensure that states are initialized in the correct order. The incorrect order may preventngxsOnInit
from being called on feature states or lead to other unpredictable errors.