fixed getTabByRelPosition

Currently, it's set at <= 0, which means going to previous tab from 2nd tab will result in an error, as it returns null. 

Changing it to < 0 fixes this issue.
This commit is contained in:
Unemployed Capital 2023-09-04 08:55:10 -06:00 committed by GitHub
parent 49525b8634
commit a01a4f00f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -228,7 +228,7 @@ class TabGroup extends HTMLElement {
getTabByRelPosition(position: number) {
position = this.getActiveTab().getPosition() + position;
if (position <= 0) {
if (position < 0) {
return null;
}
return this.getTabByPosition(position);