Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Handle parents provided by StateObject references #82

Merged
merged 1 commit into from
Apr 21, 2015
Merged

Handle parents provided by StateObject references #82

merged 1 commit into from
Apr 21, 2015

Conversation

paweld2
Copy link

@paweld2 paweld2 commented Mar 30, 2015

In the case that the 'parent' property of a state is provided as a reference to a StateObject, the function $$parentState returns a reference to the State object and not the state name. On this case the application crash.

I added a test case for this and a fix on $$parentState.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 88e8f51 on paweld2:master into * on ncuillery:master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling cfe86aa on paweld2:master into * on ncuillery:master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling f76c018 on paweld2:master into * on ncuillery:master*.

if( typeof parent === "object" ) {
// if parent is a object reference, then extract the name
name = parent.name;
}
Copy link
Owner

Choose a reason for hiding this comment

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

How about a ternary operator like this one ?

@ncuillery
Copy link
Owner

Thanks for the PR, clean and tested !

I just leave a note above. Additionally, can you amend the commit and type this message:
fix($breadcrumb): Handle parents provided by StateObject references ? I use this convention to generate the CHANGELOG.md with grunt-conventional-changelog.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling f4288d3 on paweld2:master into * on ncuillery:master*.

@paweld2
Copy link
Author

paweld2 commented Apr 7, 2015

Code fixed and message changed.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling f4288d3 on paweld2:master into * on ncuillery:master*.

@ncuillery ncuillery merged commit f4288d3 into ncuillery:master Apr 21, 2015
@ncuillery
Copy link
Owner

Landed, thanks a lot !

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

Successfully merging this pull request may close these issues.

3 participants