-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 getRangeBehavior to allow non-string calls #1216
Conversation
Thanks for the fix! I checked the internal discussion and it indeed seems like an oversight. Would you mind adding a test case to |
25ce3a1
to
d74cb06
Compare
Added a regression test @kassens ! |
behavior | ||
); | ||
behaviors[call.name] = behavior; | ||
behaviors[call.name] = call.value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the return type of this function has to be changed to {[argName: string]: mixed}
, since that's the type of call.value
. not sure why flow isn't finding this.
@xuorig see comment about the return type |
I'll fix up the return type before merging this. @facebook-github-bot import |
Thanks for importing. If you are an FB employee go to Phabricator to review. |
Thanks @kassens ! |
I applied this patch locally to my copy of Relay and it fixed the problem for me. Thanks for fixing @xuorig! |
c9fb0e8
Fixes #1208
That
invariant
doesn't seem to make sense in that function, removing it will allow us to userangeBehavior
functions with other types than string.@josephsavona