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

[BUGFIX release] Enumerate relationships provided, not all on a given… #5150

Merged
merged 1 commit into from
Aug 31, 2017

Conversation

stefanpenner
Copy link
Member

… schema


for (let i = 0, l = pushed.length; i < l; i += 2) {
modelNameToInverseMap = modelNameToInverseMap || Object.create(null);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth preventing the ToBoolean conversion here e.g. (modelNameToInverseMap !== undefined)

Copy link
Member Author

@stefanpenner stefanpenner Aug 25, 2017

Choose a reason for hiding this comment

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

I believe the cost of ToBoolean coercion in this context is negligible. I could default modelNameToInverseMap to false though, if you would prefer. That would be a minimal enough change I would feel comfortable with, although this feels like pre-mature opt territory. Let me know

Copy link
Contributor

Choose a reason for hiding this comment

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

No this seems fine.

@stefanpenner stefanpenner merged commit d3139da into master Aug 31, 2017
@stefanpenner stefanpenner deleted the only-enumerate-relationships-provided branch August 31, 2017 16:20
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.

2 participants