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(module): do not require breakpoints in withConfig #853

Merged
merged 1 commit into from
Oct 5, 2018

Conversation

livthomas
Copy link
Contributor

I have fixed issue #846 that causes runtime errors when using withConfig without providing breakpoints parameter.

There is probably a better way to fix this by locating the root cause but this solution should work for now since it is a workaround I use in my application.

@CaerusKaru
Copy link
Member

Ok, the real root cause for this:

We use Array.isArray on the breakpoints argument, but this function call doesn't work with AOT, and so we end up in the check as if it were an array (when it's really undefined), leading to errors downstream.

You've got part 1 of the fix (great work!), part 2 is to remove the Array.isArray check because it is no longer needed.

Again, excellent job!

@CaerusKaru CaerusKaru self-assigned this Oct 4, 2018
@CaerusKaru CaerusKaru added pr: needs review P0 Critical issue that needs to be resolved immediately labels Oct 4, 2018
@CaerusKaru CaerusKaru added this to the v6.0.0-beta.19 milestone Oct 4, 2018
Copy link
Member

@CaerusKaru CaerusKaru left a comment

Choose a reason for hiding this comment

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

Remove the Array.isArray check, otherwise LGTM

Fixes runtime error in AOT-compiled applications.
@livthomas
Copy link
Contributor Author

@CaerusKaru Thanks for the explanation. I have removed the Array.isArray check.

Copy link
Member

@CaerusKaru CaerusKaru left a comment

Choose a reason for hiding this comment

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

LGTM

@CaerusKaru CaerusKaru added pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for the caretaker to presubmit and merge and removed pr: needs review labels Oct 5, 2018
@CaerusKaru CaerusKaru merged commit 76c110e into angular:master Oct 5, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
@livthomas livthomas deleted the 846-withConfig-aot branch September 6, 2019 09:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes P0 Critical issue that needs to be resolved immediately pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for the caretaker to presubmit and merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants