Skip to content

Support circular structure for logger #327

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

Merged
merged 2 commits into from
Sep 22, 2016

Conversation

ktsn
Copy link
Member

@ktsn ktsn commented Sep 22, 2016

Fix #326

The logger plugin throws error if state has circular structure because JSON.stringify() cannot handle it.
I added deepCopy that handle circular structure and use it in the logger plugin.

I will also open a PR to next if this patch is ok.

@yyx990803
Copy link
Member

Can we add a unit test for this?

@ktsn
Copy link
Member Author

ktsn commented Sep 22, 2016

Added!
I moved deepCopy to util.js to test the function directly. Because it will be complicated to test it from createLogger

@yyx990803 yyx990803 merged commit 3f25d3b into vuejs:master Sep 22, 2016
@ktsn ktsn deleted the logger-circular-structure branch September 23, 2016 00:10
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