adjust commenting on js file

This commit is contained in:
Hugh Rundle 2021-10-08 18:45:28 +11:00
parent 3003b103e4
commit 48fc85c761

View file

@ -126,19 +126,14 @@ let BookWyrm = new class {
/**
* Show form.
*
* If the form has already been revealed, there is no '.is-hidden' element
* so this doesn't work as a toggle - use hideForm to hide it again
* @param {Event} event
* @return {undefined}
*/
revealForm(event) {
let trigger = event.currentTarget;
let hidden = trigger.closest('.hidden-form').querySelectorAll('.is-hidden')[0];
/**
* if the form has already been revealed, there is no '.is-hidden' element
* so this doesn't really work as a toggle
*/
if (hidden) {
this.addRemoveClass(hidden, 'is-hidden', !hidden);
}