-
Notifications
You must be signed in to change notification settings - Fork 2k
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: Serialize arrays as JSON on fetch in RESTDataSource #2219
Conversation
@aireyc1: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
0cf836f
to
c37f781
Compare
if ( | ||
options.body !== undefined && | ||
options.body !== null && | ||
(options.body.constructor === Object || | ||
options.body.constructor === Array || |
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.
It's obviously not common to sub-class an Array
, but could/should we switch this to use Array.isArray
instead to help accommodate that?
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.
@abernix Works for me. Updated.
c37f781
to
74c7627
Compare
74c7627
to
e8e4902
Compare
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.
LGTM. Thanks!
Lerna will take care of this on publishing.
Fixes issue introduced in #1125 and logged in #2186 and #2196.
Arrays are valid JSON per spec: https://tools.ietf.org/html/rfc7159
TODO: