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

Cannot read property 'toJSON' of undefined #113

Closed
lampercy opened this issue Nov 9, 2016 · 1 comment
Closed

Cannot read property 'toJSON' of undefined #113

lampercy opened this issue Nov 9, 2016 · 1 comment
Assignees

Comments

@lampercy
Copy link

lampercy commented Nov 9, 2016

const Foo = skygear.Record.extend('foo');
const foo = new Foo();
foo.c = undefined;
skygear.publicDB.save(foo)
>> Uncaught (in promise) TypeError: Cannot read property 'toJSON' of undefined

Should undefined be casted to null, or warn them skygear does not support undefined?

@rickmak
Copy link
Member

rickmak commented May 25, 2017

We should provide a better error message.

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

5 participants