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

fix(core): handle toJSON() in plugin objects #4823

Merged
merged 1 commit into from
Jul 12, 2021
Merged

fix(core): handle toJSON() in plugin objects #4823

merged 1 commit into from
Jul 12, 2021

Conversation

jcesarmobile
Copy link
Member

@jcesarmobile jcesarmobile commented Jul 12, 2021

In Capacitor 2, calling JSON.stringify(Plugin) would return an empty object. In Capacitor 3 it tries to call a native toJSON method, which doesn't exist, and throws an error.

This PR handles the toJSON call in core to make it return an empty object as it used to.

closes #4814
closes #4820

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.

CapacitoeException on iOS device
2 participants