这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ikorolev93
Copy link
Collaborator

When transformUnserializableProps encounters an object, that doesn't have Object in the prototype hierarchy, it tries to call .toString and crashes. This PR makes it call Object.prototype.toString instead.

@skyrpex skyrpex merged commit c3cad34 into skyrpex:master Nov 21, 2017
@skyrpex
Copy link
Owner

skyrpex commented Nov 21, 2017

Thank you so much! I never encountered that case, personally. How can an object not to have .toString?

@ikorolev93
Copy link
Collaborator Author

For example

const o = Object.create(null);
console.log(o.toString); // undefined

@skyrpex
Copy link
Owner

skyrpex commented Nov 21, 2017

Thanks. I'll have to add some tests soon.

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

Successfully merging this pull request may close these issues.

2 participants