Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Fix #312 #537

Merged
merged 2 commits into from
Mar 17, 2017
Merged

Fix #312 #537

merged 2 commits into from
Mar 17, 2017

Conversation

calebmer
Copy link
Contributor

Fixes #312

cc @drager, @steventebrinke

We were mutating the options object where we weren’t supposed to. So if a user had used an object instead of a function for their options then in some cases we would be setting the variables property incorrectly. I found the bug by calling Object.freeze on options if it was not a function.

There error was reproduced in: https://github.com/steventebrinke/react-apollo-error-template/commit/e80ca5ed7a89cbed0b7d39f44d24ffb433f3e111

@calebmer calebmer changed the title Fix https://github.com/apollographql/react-apollo/issues/312 Fix #312 Mar 16, 2017
@drager
Copy link
Contributor

drager commented Mar 17, 2017

@calebmer: This fix solves the issue for me. Thank you!

@steventebrinke
Copy link

Thanks, this also solves it in the real app in which I discovered the bug.

@calebmer calebmer merged commit a92f608 into master Mar 17, 2017
@calebmer calebmer deleted the calebmer-patch-1 branch March 17, 2017 14:17
@calebmer
Copy link
Contributor Author

Released in 1.0.0-rc.3 🎉

@alfondotnet
Copy link

alfondotnet commented Mar 21, 2017

This solves for me also an instance in which a query was not being triggered if specified the options as an object. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants