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(store): included underscore in stateNameRegex #663

Merged
merged 2 commits into from
Nov 26, 2018
Merged

fix(store): included underscore in stateNameRegex #663

merged 2 commits into from
Nov 26, 2018

Conversation

JasonAtallah
Copy link
Contributor

@JasonAtallah JasonAtallah commented Nov 19, 2018

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

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

What is the current behavior?

Issue Number: N/A

underscores in state name return an error saying the state name isn't valid because it is not a 'valid object property name'

What is the new behavior?

underscores are allowed in state name

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@splincode
Copy link
Member

not sure what this is good

@JasonAtallah
Copy link
Contributor Author

@splincode, the error isn't logical as an underscore is a valid object property name.

Use case:
When trying to construct a payload through substates for an API call that has underscores in property names (common practice for APIs built in Python), this error adds unnecessary logic for me to find and replace field names before making the request.

packages/store/tests/store.spec.ts Outdated Show resolved Hide resolved
packages/store/src/decorators/state.ts Show resolved Hide resolved
@splincode splincode changed the title included underscore in 'stateNameRegex' fix(store): included underscore in stateNameRegex Nov 23, 2018
Copy link
Member

@markwhitfeld markwhitfeld left a comment

Choose a reason for hiding this comment

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

LGTM

@markwhitfeld markwhitfeld merged commit 155812a into ngxs:master Nov 26, 2018
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

Successfully merging this pull request may close these issues.

3 participants