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

Issues with null initial states for form objects when upgrading from 6.6.0 to 9.0.1 #61

Open
maplion opened this issue Jun 11, 2018 · 2 comments

Comments

@maplion
Copy link

maplion commented Jun 11, 2018

This is a...

  • [ x ] bug report

What toolchain are you using for transpilation/bundling?

  • [x ] @angular/cli

Environment

Angular CLI: 6.0.8
Node: 8.9.4
OS: win32 x64
Angular: 6.0.4
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.8
@angular-devkit/build-angular     0.6.8
@angular-devkit/build-optimizer   0.6.8
@angular-devkit/core              0.6.8
@angular-devkit/schematics        0.6.8
@angular/cli                      6.0.8
@ngtools/webpack                  6.0.8
@schematics/angular               0.6.8
@schematics/update                0.6.8
rxjs                              6.2.0
typescript                        2.7.2
webpack                           4.8.3

Expected Behaviour:

Connect to an empty form without issue.

Actual Behaviour:

After upgrading 6.6.0 => 9.0.1, if the initial state of the form was null, it would crash on trying to connect before any state changes were made; it's now expecting initial values when before it didn't care. If this is intended, then it would be good to have it documented as before I had a form as null until an @angular-redux/form action was fired.

Stack Trace/Error Message:

State.traverse line 26 (e.g. can't call on a null object).
Another
core.js:1542 ERROR Error: Uncaught (in promise): Error: Must supply a value for form control with name: '<formControlName>'. Error: Must supply a value for form control with name: '<formControlName>'.

Additional Notes

We used @angular-redux/form in a production-level application that is using @angular-redux/form 6.6.0 and Angular 5.2.6 and are trying to upgrade it to Angular 6 for access to i18n.

@anodynos
Copy link

anodynos commented Jul 6, 2018

Any news with this?
Is version 9 tested with Angular 6 by anyone?

@smithad15
Copy link
Member

smithad15 commented Jul 9, 2018

Maybe I don't quite understand the scenario, but I have been unable to replicate this. If I pass null as the initial value to a control, I am not seeing any errors.

Can someone please provide a sample repo/project that shows this bug in action?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants