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

Added hash check, so we can use normal links inside the sidebar tablist #85

Closed
wants to merge 1 commit into from

Conversation

KoenDierckx
Copy link

No description provided.

@KoenDierckx
Copy link
Author

Kind of similar to #68
This just avoids getting an error

if (L.DomUtil.hasClass(this, 'active'))
this._sidebar.close();
else if (!L.DomUtil.hasClass(this, 'disabled'))
this._sidebar.open(this.querySelector('a').hash.slice(1));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you extract the this.querySelector('a').hash into a local variable to avoid the duplicate querySelector() call?

@Turbo87
Copy link
Owner

Turbo87 commented Sep 12, 2016

@KoenDierckx thanks for the PR! looks quite good to me aside from these two minor issues.

@Turbo87
Copy link
Owner

Turbo87 commented Nov 1, 2016

@KoenDierckx sorry for merging #87 before your PR. I must've missed that they targeted the same things. I've found a simpler solution for the JQuery version that I've merged in 3905461. Since both cases handled by this PR are now resolved I'll close it. Feel free to report any issues.

@Turbo87 Turbo87 closed this Nov 1, 2016
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