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: only toggle the navbar button if it's visible #62

Merged
merged 1 commit into from
Apr 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/dynamics.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ function handleClick() {
return;
}
document.getElementById('navbarPrimary').addEventListener('click', function(event) {
button.click();
if(getComputedStyle(button).display !== 'none'){
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about the indentation and whitespace standards in this project, if any.

Shouldn't we add a space after if, and before {?

Copy link
Member Author

Choose a reason for hiding this comment

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

we could add prettier or something, but I think it could be another issue

Copy link
Member

Choose a reason for hiding this comment

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

Good enough for me. I just noticed the surrounding code does have spaces in these places.

Copy link
Member Author

Choose a reason for hiding this comment

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

I use the builtin formatter of vscode and for js/ts does just the bare minimum, so it will not add/remove the spaced there.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, fair enough.

Copy link
Member Author

Choose a reason for hiding this comment

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

opened #63 just as a reminder if we want to go that way

button.click();
}
});
}

Expand Down