- const topElem = (index === -1) ? elems[elems.length-1] : elems[index];
- topElem.scrollIntoView({ block: 'start', inline: 'nearest', behavior: 'smooth'});
+ const topElem = (index === -1) ? elems[elems.length - 1] : elems[index];
+ topElem.scrollIntoView({block: 'start', inline: 'nearest', behavior: 'smooth'});