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

Attributes of type Date are converted to empty objects after normalizing. #23

Closed
flsilva opened this issue Oct 24, 2017 · 1 comment
Closed

Comments

@flsilva
Copy link

flsilva commented Oct 24, 2017

After upgrading to 0.4.3 (or 0.4.4) a normalized attribute containing a Date value returns an empty object. It works on 0.4.2.

The following is a simplified version of what I have running:

const obj = {
  data: {
    id: '1',
    type: 'projects',
    attributes: {
      'started-at': new Date(),
    },
  },
};
console.log(normalize(obj)); // startedAt is now an empty object {} instead of a Date object

Great library by the way!

@yury-dymov
Copy link
Owner

Please welcome 0.4.5.
Thank you for a good catch

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

No branches or pull requests

2 participants