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 global leak and stringify indentation #24

Merged
merged 1 commit into from Feb 28, 2017

Conversation

tjaneczko
Copy link
Contributor

The indent method was leaking into the global scope, so this PR cleans that up by adding a file-scoped _level variable. This variable is also initialized inside the stringify function rather than in the level function so that if stringify were to ever throw an exception, subsequent calls would not use the wrong indentation level.

Please let me know if you need any information or need me to do anything to help get this merged in!

@bago bago merged commit 42590b8 into brettstimmerman:master Feb 28, 2017
@bago
Copy link
Collaborator

bago commented Feb 28, 2017

Thank you!

@tjaneczko tjaneczko deleted the fix-global-leak branch February 28, 2017 13:59
@tjaneczko tjaneczko restored the fix-global-leak branch February 28, 2017 13:59
@tjaneczko
Copy link
Contributor Author

No problem, glad I could help out! Do you know when these changes might get published to npm? Thanks for the awesome library btw

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.

None yet

2 participants