FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(router): add extra validation for when route was passed as Array. by bary822 · Pull Request #9942 · angular/angular · GitHub

fix(router): add extra validation for when route was passed as Array. - #9942

Merged
vicb merged 1 commit into
angular:masterfrom
bary822:router-validation-for-unexpected-type
Jul 14, 2016
Merged

fix(router): add extra validation for when route was passed as Array.#9942
vicb merged 1 commit into
angular:masterfrom
bary822:router-validation-for-unexpected-type

Conversation

bary822 commented Jul 10, 2016

Copy link
Copy Markdown
Contributor

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x")

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
When route are given as Array, Angular throws error with Invalid route configuration: routes must have path specified which does not really express what's wrong.

What is the new behavior?
Throw error with new message Invalid route configuration: Array cannot be specified.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:
I'm certain that there are some people who think route can be given as array and it should be eventually flattened.
I hope this will them to figure out the problem they are having.
(Current error message confused me a little bit, and took sometime to resolve it.)

Comment thread modules/@angular/router/src/config.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

use Array.isArray()

vicb commented Jul 13, 2016

Copy link
Copy Markdown
Contributor

please update and squash your commits

vicb added feature Label used to distinguish feature request from other issues pr_state: LGTM action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Jul 13, 2016
bary822 force-pushed the router-validation-for-unexpected-type branch from 65acbcf to 8b900f8 Compare July 14, 2016 02:24
bary822 force-pushed the router-validation-for-unexpected-type branch from 8b900f8 to da43c6c Compare July 14, 2016 02:53

bary822 commented Jul 14, 2016

Copy link
Copy Markdown
Contributor Author

@vicb
Done, thanks for your comment.

vicb merged commit aa88438 into angular:master Jul 14, 2016

Copy link
Copy Markdown

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 Bot locked and limited conversation to collaborators Sep 9, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews cla: yes feature Label used to distinguish feature request from other issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL