Closed dmohns closed 5 months ago
Hello, Thank you for using vitepress-sidebar
.
Your comment is valid and makes a very good point. It seems that plugin need to handle empty objects or empty option values correctly.
So i have fixed that issue and it will be reflected in the next release.
Thanks!
Describe the bug
When calling
generateSidebar
with an empty options object the sidebar generation returns{}
. Passing anything fixes the behaviour, see example below.To Reproduce
Returns
Expected behavior
When calling with empty options a rendered sidebar with default values should be returned. While (I think) this doesn't happen too often in a live environment, it might occur when users are exploring and playing around with the library.
Screenshots If applicable, add screenshots to help explain your problem.
N/A
Desktop (please complete the following information):
Additional context
I'm not very experienced with JavaScript. Maybe such a behaviour is totally normal and intuitive for JS users. If so, please ignore this bug report 😉