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: should not throw errors when navItems are undefined #46

Merged

Conversation

fluffynuts
Copy link
Contributor

I came across an esoteric error today after updating, with the message being about not being able to parse some JSON. I eventually tracked it down by monkey-patching JSON.parse and finding the error coming from the fact that my navItems property on my component was undefined at the point at which it was being run through the JSON.parse/JSON.stringify line that I've changed.
I'm assuming the introduction of the stringify/parse is to get a deep clone of the array -- the fix supplied would treat undefined items as if there are no items.

@xidedix xidedix merged commit 35d7a93 into coreui:master Feb 5, 2019
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