Skip to content
This repository was archived by the owner on Jan 26, 2021. It is now read-only.

#117 Parse-React tries to flatten elements of array even if they're not Parse Objects #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mmazzarolo
Copy link

Fix for #157

mappedFlatten(el) tried to flatten every element of the array (by calling flatten(el)) even if they are not Parse Objects, resulting in many Attempted to flatten something that is not a Parse Object warnings.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@lrettig
Copy link

lrettig commented Jan 19, 2016

For the record, there is one side effect of this change. The behavior will be different when flattening a Javascript Object which contains other (non-flattened) Objects.

Before the change, the entire Object hierarchy will be walked, and all Objects will be flattened, i.e., all parse objects will be replaced with pointers to those objects.

After the change, only the top-level object will be flattened; if it contains any objects below it, they won't be.

I noticed this because I have a Parse class with a column that contains an Object structure.

@maqen
Copy link

maqen commented Feb 12, 2016

@mmazzarolo I've made some changes allowing local subscriptions (currentUser) to be refreshed, but have you any tips on how I can use my local/fork in my project? How do one create the /lib folder on npm? REACT_NATIVE=true gulp lib creates the folders needed but don't see how I can use that in my project. Any hints?

@ghost ghost added the CLA Signed label Jul 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants